Skip to content

Commit

Permalink
yolo
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed Sep 25, 2024
1 parent 5a86b0f commit 9d08573
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chatlab/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,13 @@ def api_manifest(self, function_call_option: FunctionCall = "auto") -> APIManife

@property
def tools(self) -> Iterable[ChatCompletionToolParam]:
return [{"type": "function", "function": adapt_function_definition(f)} for f in self.__schemas.values()]
return [
ChatCompletionToolParam(
type="function",
function=adapt_function_definition(f), # type: ignore
)
for f in self.__schemas.values()
]

async def call(self, name: str, arguments: Optional[str] = None) -> Any:
"""Call a function by name with the given parameters."""
Expand Down

0 comments on commit 9d08573

Please sign in to comment.