Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -981,7 +981,7 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 981 |
elif name is None and number is None :
|
| 982 |
return "You must provide your name and a random number to continue."
|
| 983 |
else:
|
| 984 |
-
return "Function call successfull"
|
| 985 |
|
| 986 |
# functions = [
|
| 987 |
# {
|
|
@@ -1073,15 +1073,14 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
|
|
| 1073 |
name=arguments_dict["name"],
|
| 1074 |
number=arguments_dict["number"]
|
| 1075 |
)
|
| 1076 |
-
|
| 1077 |
-
|
| 1078 |
print("FUNCTION_RESPONSE:", function_response)
|
| 1079 |
print("ARGUMENTS VALUES:", arguments_dict["name"], arguments_dict["number"])
|
| 1080 |
messages.append(comp)
|
| 1081 |
messages.append({
|
| 1082 |
"role": "function",
|
| 1083 |
"name": function_name,
|
| 1084 |
-
"content":
|
| 1085 |
})
|
| 1086 |
second_response = openai.ChatCompletion.create(
|
| 1087 |
model="gpt-3.5-turbo",
|
|
|
|
| 981 |
elif name is None and number is None :
|
| 982 |
return "You must provide your name and a random number to continue."
|
| 983 |
else:
|
| 984 |
+
return "Function call successfull"
|
| 985 |
|
| 986 |
# functions = [
|
| 987 |
# {
|
|
|
|
| 1073 |
name=arguments_dict["name"],
|
| 1074 |
number=arguments_dict["number"]
|
| 1075 |
)
|
| 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",
|