forked from phoenix/litellm-mirror
Rename ollama prompt:
- 'Function' word to 'FunctionName' - 'Tool Call' to `FunctionCall` - 'Tool Call Result' to 'FunctionCall Result' _I found that changes make some models better_
This commit is contained in:
parent
e2af13550a
commit
b69a092f56
1 changed files with 2 additions and 2 deletions
|
@ -181,9 +181,9 @@ 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"]}):\nName: {function_name}\nArguments: {json.dumps(arguments)}\n\n"
|
||||
prompt += f"### FunctionCall ({call["id"]}):\nFunctionName: {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"
|
||||
prompt += f"### FunctionCall Result ({message["tool_call_id"]}):\n{message["content"]}\n\n"
|
||||
elif content:
|
||||
prompt += f"### {role.capitalize()}:\n{content}\n\n"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue