namespace_callable
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| NamespaceCallable llmling_agent.resource_providers.codemode.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/llmling_agent/resource_providers/codemode/namespace_callable.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | |
name_override
class-attribute
instance-attribute
¶
name_override: str | None = None
Override name for the callable, defaults to callable.name.
__call__
async
¶
__call__(*args, **kwargs) -> Any
Execute the wrapped callable.
Source code in src/llmling_agent/resource_providers/codemode/namespace_callable.py
66 67 68 69 70 71 72 73 | |
__post_init__
¶
__post_init__() -> None
Set function attributes for introspection.
Source code in src/llmling_agent/resource_providers/codemode/namespace_callable.py
31 32 33 34 | |
__repr__
¶
__repr__() -> str
Return detailed representation for debugging.
Source code in src/llmling_agent/resource_providers/codemode/namespace_callable.py
75 76 77 | |
__str__
¶
__str__() -> str
Return readable string representation.
Source code in src/llmling_agent/resource_providers/codemode/namespace_callable.py
79 80 81 | |
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 |
Source code in src/llmling_agent/resource_providers/codemode/namespace_callable.py
54 55 56 57 58 59 60 61 62 63 64 | |
from_tool
classmethod
¶
from_tool(tool: Tool) -> NamespaceCallable
Create a NamespaceCallable from a Tool.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tool
|
Tool
|
The tool to wrap |
required |
Returns:
| Type | Description |
|---|---|
NamespaceCallable
|
NamespaceCallable instance |
Source code in src/llmling_agent/resource_providers/codemode/namespace_callable.py
41 42 43 44 45 46 47 48 49 50 51 52 | |