trading_agent.requests.plan_response
¶
The user's decision on a desk's plan: approve it, or ask for changes with feedback.
Typical usage example:
response = PlanResponse(request, 'revise', 'Smaller size on the first trade') response.check() text = response.message()
PlanResponse
¶
Approve, or keep planning with the user's feedback.
Creates the response.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
UserRequest
|
The plan request. |
required |
decision
|
str
|
"approve" or "revise". |
required |
feedback
|
str
|
What the user wants changed, or a note with an approval. |
required |
Source code in src/trading_agent/requests/plan_response.py
check
¶
Checks the decision.
Raises:
| Type | Description |
|---|---|
ValueError
|
The decision is neither "approve" nor "revise", or a revision has no feedback. |
Source code in src/trading_agent/requests/plan_response.py
stored
¶
The response as saved with the request.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
The decision and the feedback. |
message
¶
The message the desk receives.
Returns:
| Type | Description |
|---|---|
str
|
The decision, with the feedback. |