namespace_callable
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| NamespaceCallable schemez.code_generation.namespace_callable Wrapper for tool functions with proper repr and call interface. |
🛈 DocStrings¶
Namespace callable wrapper for tools.
NamespaceCallable
dataclass
¶
Wrapper for tool functions with proper repr and call interface.
Source code in src/schemez/code_generation/namespace_callable.py
name_override
class-attribute
instance-attribute
¶
Override name for the callable, defaults to callable.name.
__call__
async
¶
Execute the wrapped callable.
Results (also falsy ones) and exceptions pass through unchanged; only None
becomes a short confirmation text.
Source code in src/schemez/code_generation/namespace_callable.py
__post_init__
¶
Set function attributes for introspection.
__repr__
¶
__str__
¶
from_generator
classmethod
¶
from_generator(generator: ToolCodeGenerator) -> NamespaceCallable
Create a NamespaceCallable from a ToolCodeGenerator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
generator
|
ToolCodeGenerator
|
The generator to wrap |
required |
Returns:
| Type | Description |
|---|---|
NamespaceCallable
|
NamespaceCallable instance |