Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -190,7 +190,10 @@ def function(Textbox, Textbox2, Textbox3, Dropdown):
|
|
190 |
sleep(0.8)
|
191 |
def chat_with_assistant(messages, functions=None):
|
192 |
chat = openai.ChatCompletion.create(
|
193 |
-
model=model,
|
|
|
|
|
|
|
194 |
)
|
195 |
reply = chat.choices[0].message.content
|
196 |
return reply
|
|
|
190 |
sleep(0.8)
|
191 |
def chat_with_assistant(messages, functions=None):
|
192 |
chat = openai.ChatCompletion.create(
|
193 |
+
model=model,
|
194 |
+
messages=data["messages"],
|
195 |
+
functions=functions,
|
196 |
+
function_call="auto"
|
197 |
)
|
198 |
reply = chat.choices[0].message.content
|
199 |
return reply
|