@@ -608,8 +608,8 @@ def __init__(self, args: ChatHandlerArgs, parallel_calls: bool):
608
608
content = '\n ' .join ([
609
609
'You are a function calling AI model.' ,
610
610
'Here are the tools available:' ,
611
- # _tools_schema_signatures(self.args.tools, indent=2),
612
- _tools_typescript_signatures (self .args .tools ),
611
+ _tools_schema_signatures (self .args .tools , indent = 2 ),
612
+ # _tools_typescript_signatures(self.args.tools),
613
613
_please_respond_with_schema (
614
614
_make_bespoke_schema (
615
615
response_schema ,
@@ -714,16 +714,16 @@ def get_chat_handler(args: ChatHandlerArgs, parallel_calls: bool, tool_style: Op
714
714
715
715
# os.environ.get('NO_TS')
716
716
def _please_respond_with_schema (schema : dict ) -> str :
717
- # sig = json.dumps(schema, indent=2)
718
- _ts_converter = SchemaToTypeScriptConverter ()
719
- _ts_converter .resolve_refs (schema , 'schema' )
720
- sig = _ts_converter .visit (schema )
717
+ sig = json .dumps (schema , indent = 2 )
718
+ # _ts_converter = SchemaToTypeScriptConverter()
719
+ # # _ts_converter.resolve_refs(schema, 'schema')
720
+ # sig = _ts_converter.visit(schema)
721
721
return f'Please respond in JSON format with the following schema: { sig } '
722
722
723
723
def _tools_typescript_signatures (tools : list [Tool ]) -> str :
724
724
_ts_converter = SchemaToTypeScriptConverter ()
725
- for tool in tools :
726
- _ts_converter .resolve_refs (tool .function .parameters , tool .function .name )
725
+ # for tool in tools:
726
+ # _ts_converter.resolve_refs(tool.function.parameters, tool.function.name)
727
727
728
728
return 'namespace functions {\n ' + '\n ' .join (
729
729
'// ' + tool .function .description .replace ('\n ' , '\n // ' ) + '\n ' + ''
0 commit comments