Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 32.6 KB

File metadata and controls

18 lines (14 loc) · 32.6 KB

ChatMessageFragment

A typed fragment within a chat message that carries text or structured content such as citations, actions, and tool output.

Fields

Field Type Required Description Example
structured_results List[models.StructuredResult] An array of entities in the work graph retrieved via a data request.
tracking_token Optional[str] An opaque token that represents this particular result in this particular query. To be used for /feedback reporting.
text Optional[str] N/A
query_suggestion Optional[models.QuerySuggestion] N/A {
"query": "app:github type:pull author:mortimer",
"label": "Mortimer's PRs",
"datasource": "github"
}
file Optional[models.ChatFile] Structure for file uploaded by a user for Chat.
action Optional[models.ToolInfo] N/A
citation Optional[models.ChatMessageCitation] Information about the source for a ChatMessage.
server_tool_request Optional[models.ServerToolRequest] N/A
server_tool_response Optional[models.ServerToolResponse] Response to a server tool request. The applicable fields depend on requestType:

For EXECUTION requests:
- isGranted: whether tool execution is approved
- reason: optional explanation

For AUTHENTICATION_SUGGESTION requests:
- isGranted: whether auth completed successfully (true=connected, false=skipped)
- authContext: contains serverId or actionPackId for identifying the authenticated entity
- reason: optional explanation for skip

For VOTE_SUGGESTION requests:
- voted: whether the user voted for this tool

For SANDBOX_EGRESS requests:
- isGranted: whether the sandbox egress call is approved