Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -1076,15 +1076,23 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 1076 |
|
| 1077 |
print("FUNCTION_RESPONSE:", function_response)
|
| 1078 |
print("ARGUMENTS VALUES:", arguments_dict["name"], arguments_dict["number"])
|
| 1079 |
-
messages.append(comp)
|
| 1080 |
-
messages.append({
|
| 1081 |
-
|
| 1082 |
-
|
| 1083 |
-
|
| 1084 |
-
})
|
| 1085 |
second_response = openai.ChatCompletion.create(
|
| 1086 |
model="gpt-3.5-turbo",
|
| 1087 |
-
messages=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1088 |
)
|
| 1089 |
print("YES_FUNCTION_CALL RESPONSE TRY (NO IMAGE)")
|
| 1090 |
return second_response
|
|
|
|
| 1076 |
|
| 1077 |
print("FUNCTION_RESPONSE:", function_response)
|
| 1078 |
print("ARGUMENTS VALUES:", arguments_dict["name"], arguments_dict["number"])
|
| 1079 |
+
# messages.append(comp)
|
| 1080 |
+
# messages.append({
|
| 1081 |
+
# "role": "function",
|
| 1082 |
+
# "name": function_name,
|
| 1083 |
+
# "content": function_response
|
| 1084 |
+
# })
|
| 1085 |
second_response = openai.ChatCompletion.create(
|
| 1086 |
model="gpt-3.5-turbo",
|
| 1087 |
+
messages=[
|
| 1088 |
+
{"role":"user","content": UserInput},
|
| 1089 |
+
comp,
|
| 1090 |
+
{
|
| 1091 |
+
"role": "function",
|
| 1092 |
+
"name": function_name,
|
| 1093 |
+
"content": function_response
|
| 1094 |
+
}
|
| 1095 |
+
]
|
| 1096 |
)
|
| 1097 |
print("YES_FUNCTION_CALL RESPONSE TRY (NO IMAGE)")
|
| 1098 |
return second_response
|