You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/guide/api-reference/classes/ModelAdapter.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The `ModelAdapter` class provides a unified interface for integrating different
8
8
9
9
Adapters are automatically registered with the [`AdapterManager`](#adaptermanager) when defined, unless marked as abstract or explicitly disabled from registration.
10
10
11
-
> **Note**: The `ModelAdapter` base class has been moved from `amrita_core.protocol` to `amrita_core.base.adapter`. The `amrita_core.protocol`module is now a deprecated re-export wrapper.
11
+
> **Note**: The `ModelAdapter` base class has been moved from `amrita_core.protocol` to `amrita_core.base.adapter`. The `amrita_core.protocol`compatibility endpoint was removed in v0.10.x+; import from `amrita_core.base.adapter`.
`RequestMetadata` captures per-request diagnostic information returned by every adapter call through `UniResponse.metadata`.
4
+
5
+
## Properties
6
+
7
+
-`request_id` (str): Auto-generated unique request ID (UUID4). Defaults to a new UUID if not provided.
8
+
-`original_request_id` (str | None): Original request ID returned by the LLM provider adapter (e.g., OpenAI's `_request_id`, Anthropic's `request_id`). `None` when unavailable.
9
+
-`model` (str): The model used for the request. Defaults to `"__NOT_GIVEN__"` when not available (e.g., streaming before the first chunk).
10
+
-`stop_sequence` (str | None): The stop sequence that terminated generation, if any.
11
+
-`stop_reason` (STOP_REASON | None): Why the generation stopped. One of:
Copy file name to clipboardExpand all lines: docs/docs/guide/api-reference/classes/StrategyLikedObject.md
-14Lines changed: 0 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,6 @@ Called once by the framework when the execution context is ready. Subclasses may
44
44
45
45
**Returns:**`Self`
46
46
47
-
---
48
-
49
47
### `async single_execute() -> bool`
50
48
51
49
Execute a single agent step for `"agent"` and `"agent-mixed"` category strategies. Called by the framework to perform one iteration of tool calling.
@@ -54,8 +52,6 @@ Execute a single agent step for `"agent"` and `"agent-mixed"` category strategie
54
52
55
53
**Note:** This method is used by `"agent"` and `"agent-mixed"` category strategies. `"rag"` and `"workflow"` category strategies should implement `run()` instead.
56
54
57
-
---
58
-
59
55
### `async run() -> None`
60
56
61
57
Run the complete agent strategy for `"rag"` and `"workflow"` category strategies. Gives full control to the strategy implementation for managing tool calling iterations, context construction, error handling, and response generation.
@@ -67,8 +63,6 @@ Run the complete agent strategy for `"rag"` and `"workflow"` category strategies
67
63
68
64
**Note:** This method is used by `"rag"` and `"workflow"` category strategies. `"agent"` and `"agent-mixed"` category strategies should implement `single_execute()` instead.
69
65
70
-
---
71
-
72
66
### `async call_tool(tool_call: ToolCall) -> str`
73
67
74
68
Execute a single tool call without modifying the agent's context.
@@ -83,16 +77,12 @@ Execute a single tool call without modifying the agent's context.
83
77
84
78
**Returns:**`str` — The string response from the tool execution, or a default message if the tool returns `None`
85
79
86
-
---
87
-
88
80
### `async on_limited() -> None`
89
81
90
82
Handle the event when the agent reaches its tool calling limit. Called when the agent strategy has reached the maximum allowed number of tool calls.
91
83
92
84
**Default behavior:** Sends a notification message to the user about the limit being reached.
0 commit comments