HsbcJone commented on code in PR #1352:
URL: https://github.com/apache/flink-agents/pull/1352#discussion_r4488704217
##########
docs/content/docs/development/create-agent/events.md:
##########
@@ -278,3 +278,53 @@ Event that your Actions can handle to continue the
workflow:
| Call tools | `ToolRequestEvent`, `ToolResponseEvent` | [Tool Use]({{< ref
"docs/development/calling-llms/tool_use#built-in-events-and-actions" >}}) |
| Retrieve context | `ContextRetrievalRequestEvent`,
`ContextRetrievalResponseEvent` | [Vector Stores]({{< ref
"docs/development/vector-search/vector_stores#built-in-events-and-actions" >}})
|
| Call a decision model | `DecisionRequestEvent`, `DecisionResponseEvent` |
[Decision Models]({{< ref "docs/development/decision_models#event-driven-calls"
>}}) |
+
+### Request context
+
+Chat, tool, context-retrieval, and decision request events accept an optional
`context`
+value: a map or other JSON-compatible object your Action uses to tell
responses apart.
+The built-in Action copies that value onto the matching response and does not
add it to
+the prompt, tool arguments, or vector-store query. Omitting it leaves the
response
+without a `context` attribute, which is what existing callers do.
+
+The value is copied when the event is created, including nested maps and
lists, so a
+later change to the object you passed in does not change the event. It
round-trips as
Review Comment:
Updated on `e963cca`. The User context section now points at the existing
Serialization and Typed Values rules instead of defining a separate round-trip
contract.
##########
docs/content/docs/development/create-agent/events.md:
##########
@@ -278,3 +278,53 @@ Event that your Actions can handle to continue the
workflow:
| Call tools | `ToolRequestEvent`, `ToolResponseEvent` | [Tool Use]({{< ref
"docs/development/calling-llms/tool_use#built-in-events-and-actions" >}}) |
| Retrieve context | `ContextRetrievalRequestEvent`,
`ContextRetrievalResponseEvent` | [Vector Stores]({{< ref
"docs/development/vector-search/vector_stores#built-in-events-and-actions" >}})
|
| Call a decision model | `DecisionRequestEvent`, `DecisionResponseEvent` |
[Decision Models]({{< ref "docs/development/decision_models#event-driven-calls"
>}}) |
+
+### Request context
+
+Chat, tool, context-retrieval, and decision request events accept an optional
`context`
+value: a map or other JSON-compatible object your Action uses to tell
responses apart.
+The built-in Action copies that value onto the matching response and does not
add it to
+the prompt, tool arguments, or vector-store query. Omitting it leaves the
response
+without a `context` attribute, which is what existing callers do.
Review Comment:
Removed on `e963cca` — dropped the “existing callers” migration wording and
the attachments comparison paragraph so the section stays on the current user
contract.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]