bug fix, generate openapi spec

This commit is contained in:
Ashwin Bharambe 2025-01-21 15:56:48 -08:00
parent 039982004d
commit 460dc8a72a
5 changed files with 680 additions and 1137 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -440,7 +440,7 @@ class ToolRuntimeRouter(ToolRuntime):
) -> None: ) -> None:
self.routing_table = routing_table self.routing_table = routing_table
# TODO: this should be in sync with "get_all_api_endpoints()" # HACK ALERT this should be in sync with "get_all_api_endpoints()"
# TODO: make sure rag_tool vs builtin::memory is correct everywhere # TODO: make sure rag_tool vs builtin::memory is correct everywhere
self.rag_tool = self.RagToolImpl(routing_table) self.rag_tool = self.RagToolImpl(routing_table)
setattr(self, "rag_tool.query_context", self.rag_tool.query_context) setattr(self, "rag_tool.query_context", self.rag_tool.query_context)

View file

@ -38,6 +38,8 @@ def get_all_api_endpoints() -> Dict[Api, List[ApiEndpoint]]:
for api, protocol in protocols.items(): for api, protocol in protocols.items():
endpoints = [] endpoints = []
protocol_methods = inspect.getmembers(protocol, predicate=inspect.isfunction) protocol_methods = inspect.getmembers(protocol, predicate=inspect.isfunction)
# HACK ALERT
if api == Api.tool_runtime: if api == Api.tool_runtime:
for tool_group in SpecialToolGroup: for tool_group in SpecialToolGroup:
sub_protocol = toolgroup_protocols[tool_group] sub_protocol = toolgroup_protocols[tool_group]

View file

@ -970,7 +970,7 @@ async def execute_tool_call_maybe(
result = await tool_runtime_api.invoke_tool( result = await tool_runtime_api.invoke_tool(
tool_name=name, tool_name=name,
args=dict( kwargs=dict(
session_id=session_id, session_id=session_id,
**tool_call_args, **tool_call_args,
), ),