lachie0232 commited on
Commit
fef1ef1
·
verified ·
1 Parent(s): e5b5bad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -7,7 +7,7 @@ openai.api_key = "your-openai-secret-key"
7
  # Define a function to call the OpenAI API (new method)
8
  def chatbot(input_text):
9
  try:
10
- response = openai.chat_completions.create(
11
  model="gpt-3.5-turbo", # You can change this model if you have access to GPT-4 or other models
12
  messages=[
13
  {"role": "system", "content": "You are a helpful assistant."},
@@ -29,3 +29,4 @@ iface = gr.Interface(
29
  # Launch the interface
30
  iface.launch()
31
 
 
 
7
  # Define a function to call the OpenAI API (new method)
8
  def chatbot(input_text):
9
  try:
10
+ response = openai.ChatCompletion.create(
11
  model="gpt-3.5-turbo", # You can change this model if you have access to GPT-4 or other models
12
  messages=[
13
  {"role": "system", "content": "You are a helpful assistant."},
 
29
  # Launch the interface
30
  iface.launch()
31
 
32
+