Rename ollama prompt 'Function' word to 'Name'

This commit is contained in:
Islam Nofl 2024-06-24 08:01:15 +03:00 committed by GitHub
parent b8a8b0847c
commit e2af13550a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,7 +181,7 @@ def ollama_pt(
for call in message["tool_calls"]:
function_name = call["function"]["name"]
arguments = json.loads(call["function"]["arguments"])
prompt += f"### Tool Call ({call["id"]}):\nFunction: {function_name}\nArguments: {json.dumps(arguments)}\n\n"
prompt += f"### Tool Call ({call["id"]}):\nName: {function_name}\nArguments: {json.dumps(arguments)}\n\n"
elif "tool_call_id" in message:
prompt += f"### Tool Call Result ({message["tool_call_id"]}):\n{message["content"]}\n\n"
elif content: