AnalysisWithMSR commited on
Commit
4eb77f8
·
verified ·
1 Parent(s): 9823a49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -152,16 +152,16 @@ def generate_optimized_content(summarized_transcript):
152
  """
153
 
154
  try:
155
- response = openai.ChatCompletion.create(
156
  model="gpt-3.5-turbo",
157
  messages=[
158
- {"role": "system", "content": "You are an SEO expert."},
159
- {"role": "user", "content": prompt}
160
- ]
161
- )
162
- response_content = response['choices'][0]['message']['content']
163
- content = json.loads(response_content)
164
- return content
165
  except Exception as e:
166
  return {"error": str(e)}
167
 
 
152
  """
153
 
154
  try:
155
+ response = openai.chat.completions.create(
156
  model="gpt-3.5-turbo",
157
  messages=[
158
+ {"role": "system", "content": "You are a helpful assistant."},
159
+ {"role": "user", "content": "Hello, how are you?"}
160
+ ]
161
+ )
162
+
163
+ # Print the assistant's reply
164
+ print(response.choices[0].message.content)
165
  except Exception as e:
166
  return {"error": str(e)}
167