rm unnecessary function call

This commit is contained in:
yzlin 2024-02-27 17:59:50 +08:00
parent 219d361ca6
commit a2b85641c3
9 changed files with 54 additions and 80 deletions

View file

@ -361,16 +361,6 @@ def parse_recipient(text):
return ""
def create_func_call_config(func_schema: dict) -> dict:
"""Create new function call config"""
tools = [{"type": "function", "function": func_schema}]
tool_choice = {"type": "function", "function": {"name": func_schema["name"]}}
return {
"tools": tools,
"tool_choice": tool_choice,
}
def remove_comments(code_str: str) -> str:
"""Remove comments from code."""
pattern = r"(\".*?\"|\'.*?\')|(\#.*?$)"