| |
- gen_ai_hub.orchestration.models.base.JSONSerializable(abc.ABC)
-
- ChatCompletionTool
-
- FunctionTool
class FunctionTool(ChatCompletionTool) |
|
FunctionTool(name: str, parameters: dict, strict: bool = False, description: Optional[str] = None, function: Optional[Callable] = None)
Represents a function tool for OpenAI-like function calling. |
|
- Method resolution order:
- FunctionTool
- ChatCompletionTool
- gen_ai_hub.orchestration.models.base.JSONSerializable
- abc.ABC
- builtins.object
Methods defined here:
- __init__(self, name: str, parameters: dict, strict: bool = False, description: Optional[str] = None, function: Optional[Callable] = None)
- Initialize self. See help(type(self)) for accurate signature.
- async aexecute(self, **kwargs: Any) -> Any
- Asynchronously execute the function with the provided arguments.
- execute(self, **kwargs: Any) -> Any
- Execute the function with the provided arguments.
- to_dict(self) -> Dict[str, Any]
- Convert the object to a JSON-serializable dictionary.
Static methods defined here:
- from_function(func: Callable, *, description: Optional[str] = None, strict: bool = False) -> 'FunctionTool'
- Create a FunctionTool from a Python function.
Data and other attributes defined here:
- __abstractmethods__ = frozenset()
- __annotations__ = {}
Data descriptors inherited from gen_ai_hub.orchestration.models.base.JSONSerializable:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |