MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / process_assistant_reply

Function process_assistant_reply

preprocess/preprocess_toolllama_data.py:17–27  ·  view source on GitHub ↗
(message_dict: dict)

Source from the content-addressed store, hash-verified

15
16def preprocess_rapidapi(tool_data_dir, method, output_file):
17 def process_assistant_reply(message_dict: dict) -> str:
18 content = message_dict["content"]
19 if "function_call" in message_dict:
20 function_call = message_dict["function_call"]
21 reply = function_call # the whole dict containing action name and action input as target.
22 elif content is not None:
23 reply = content
24 else:
25 print(f"Wrong assistant reply: {message_dict}")
26 return ""
27 return reply
28
29 def append_list(instances_list: list) -> list:
30 return_list = []

Callers 1

preprocess_rapidapiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected