Skip to content

Commit 554e82c

Browse files
committed
Other fixes to match english
1 parent ce6e31f commit 554e82c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

spanish/function_calling.py renamed to spanish/function_calling_basic.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@
6969
tools=tools,
7070
)
7171

72-
print(f"Respuesta de {API_HOST}: \n")
73-
print(response.choices[0].message.tool_calls[0].function.name)
74-
print(response.choices[0].message.tool_calls[0].function.arguments)
72+
print(f"Respuesta de {MODEL_NAME} en {API_HOST}: \n")
73+
74+
if response.choices[0].message.tool_calls:
75+
tool_call = response.choices[0].message.tool_calls[0]
76+
print(tool_call.function.name)
77+
print(tool_call.function.arguments)
78+
else:
79+
print(response.choices[0].message.content)

0 commit comments

Comments
 (0)