OpenAIAgent.from_tools
how to get a list of tools that have already been added, and add more without redefining the agent entirely?OpenAIAgent.from_tools
constantly in a chat_function_config = { 'type': 'function', 'function': { "name": name, "description": description, "parameters": {"type": "object", "properties": json_args}, "required": ["url"], }} llama_tool = FunctionTool.from_defaults( lambda **args: self.execute_func(name, packages, code, **args), name, description, _function_config )
AttributeError: 'dict' object has no attribute 'schema'
name
, description
, fn_schema
, tool_metadata
llama_tool = FunctionTool.from_defaults( lambda **args: self.execute_func(name, packages, code, **args), ToolMetadata(description=description, name=name, fn_schema={...} )
parameters = { "type": "object", "properties": { "input": {"title": "input query string", "type": "string"}, }, "required": ["input"], }
{ 'type': 'function', 'function': { "name": name, "description": description, "parameters": {"type": "object", "properties": json_args}, "required": ["url"], }