Skip to content

Commit

Permalink
provide tools for multiple function calling
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed Jan 16, 2024
1 parent 1909bd4 commit 561c537
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chatlab/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,10 @@ def api_manifest(self, function_call_option: FunctionCall = "auto") -> APIManife
"function_call": function_call_option,
}

@property
def tools(self):
return [{"type": "function", "function": adapt_function_definition(f)} 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."""
if name is None:
Expand Down

0 comments on commit 561c537

Please sign in to comment.