mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
revert unwanted change to tool calling
This commit is contained in:
parent
98eade358a
commit
9f7fd63160
1 changed files with 1 additions and 1 deletions
|
@ -1882,7 +1882,7 @@ def transform_genparams(genparams, api_format):
|
|||
if message['role'] == "user" and message_index == len(messages_array):
|
||||
# Check if user is passing a openai tools array, if so add to end of prompt before assistant prompt unless tool_choice has been set to None
|
||||
tools_array = genparams.get('tools', [])
|
||||
if tools_array and len(tools_array) > 0 :
|
||||
if tools_array and len(tools_array) > 0 and genparams.get('tool_choice',None) is not None:
|
||||
response_array = [{"id": "insert an id for the response", "type": "function", "function": {"name": "insert the name of the function you want to call", "arguments": {"first property key": "first property value", "second property key": "second property value"}}}]
|
||||
json_formatting_instruction = " Use this style of JSON object formatting to give your answer if you think the user is asking you to perform an action: " + json.dumps(response_array, indent=0)
|
||||
tools_string = json.dumps(tools_array, indent=0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue