Shreyask09 commited on
Commit
0339d8d
·
1 Parent(s): b9cd95e

Update space

Browse files
Files changed (1) hide show
  1. email_generator/main.py +2 -1
email_generator/main.py CHANGED
@@ -123,10 +123,11 @@ def JSON_llm(prompt: str, openai_api_key: str = None, use_huggingface: bool = Fa
123
  """
124
  # Example: Use llm_call or a similar function to generate a response
125
  raw_response = llm_call(prompt,model="gpt-3.5-turbo", api_key=openai_api_key, use_huggingface=use_huggingface)
126
-
127
  try:
128
  # Parse and validate the response against the schema
129
  parsed_response = schema.parse_raw(raw_response)
 
130
  return parsed_response.dict()
131
  except ValidationError as e:
132
  # Log or handle the validation error
 
123
  """
124
  # Example: Use llm_call or a similar function to generate a response
125
  raw_response = llm_call(prompt,model="gpt-3.5-turbo", api_key=openai_api_key, use_huggingface=use_huggingface)
126
+ console.print("Raw response:", raw_response)
127
  try:
128
  # Parse and validate the response against the schema
129
  parsed_response = schema.parse_raw(raw_response)
130
+ console.print("Parsed response:", parsed_response)
131
  return parsed_response.dict()
132
  except ValidationError as e:
133
  # Log or handle the validation error