ToolCallInfo
Base classes¶
Name | Children | Inherits |
---|---|---|
BaseModel pydantic.main !!! abstract "Usage Documentation" |
⋔ Inheritance diagram¶
graph TD
94111449611440["tool_call_info.ToolCallInfo"]
94111433495376["main.BaseModel"]
139887694254272["builtins.object"]
94111433495376 --> 94111449611440
139887694254272 --> 94111433495376
🛈 DocStrings¶
Bases: BaseModel
Information about an executed tool call.
Source code in src/llmling_agent/tools/tool_call_info.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|
agent_tool_name
class-attribute
instance-attribute
¶
agent_tool_name: str | None = None
If this tool is agent-based, the name of that agent.
context_data
class-attribute
instance-attribute
¶
context_data: Any | None = None
Optional context data that was passed to the agent's run() method.
error
class-attribute
instance-attribute
¶
error: str | None = None
Error message if the tool call failed.
message_id
class-attribute
instance-attribute
¶
message_id: str | None = None
ID of the message that triggered this tool call.
timestamp
class-attribute
instance-attribute
¶
When the tool was called.
timing
class-attribute
instance-attribute
¶
timing: float | None = None
Time taken for this specific tool call in seconds.
tool_call_id
class-attribute
instance-attribute
¶
ID provided by the model (e.g. OpenAI function call ID).
format
¶
format(
style: FormatStyle = "simple",
*,
template: str | None = None,
variables: dict[str, Any] | None = None,
show_timing: bool = True,
show_ids: bool = False,
) -> str
Format tool call information with configurable style.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
style
|
FormatStyle
|
Predefined style to use: - simple: Compact single-line format - detailed: Multi-line with all details - markdown: Formatted markdown with syntax highlighting |
'simple'
|
template
|
str | None
|
Optional custom template (required if style="custom") |
None
|
variables
|
dict[str, Any] | None
|
Additional variables for template rendering |
None
|
show_timing
|
bool
|
Whether to include execution timing |
True
|
show_ids
|
bool
|
Whether to include tool_call_id and message_id |
False
|
Returns:
Type | Description |
---|---|
str
|
Formatted tool call information |
Raises:
Type | Description |
---|---|
ValueError
|
If style is invalid or custom template is missing |
Source code in src/llmling_agent/tools/tool_call_info.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
|