a2ui-project / a2ui-project/a2ui

how to send reasoning or tool call event?

Abierto
#445 3 comentarios 1 reacción 0 asignados Ver en GitHub
status: first-line-handled status: waiting-for-author-response type: feature/enhancement
Lenguaje dominante
TypeScript
Estrellas
16.4k
Forks
1.3k
Merge medio
2 d 13 h
PR fusionados (30 d)
134

Descripción

```
data: {"type":"RUN_STARTED","threadId":"7b6928a1-5bbf-405a-aeb8-0a8106ed2534","runId":"4447e661-e4fb-4fda-9fdf-8df2f9693bc8","input":{"threadId":"7b6928a1-5bbf-405a-aeb8-0a8106ed2534","runId":"4447e661-e4fb-4fda-9fdf-8df2f9693bc8","state":{},"messages":[{"id":"e6e78126-0583-4933-a4db-7a3f9c884215","role":"user","content":"profile"}],"tools":[],"context":[],"forwardedProps":{}}}

data: {"type":"RAW","event":{"contextId":"7b6928a1-5bbf-405a-aeb8-0a8106ed2534","history":[{"contextId":"7b6928a1-5bbf-405a-aeb8-0a8106ed2534","kind":"message","messageId":"e6e78126-0583-4933-a4db-7a3f9c884215","parts":[{"kind":"text","text":"profile"}],"role":"user","taskId":"747f3d2c-83c6-4f96-9879-821516f110f7"}],"id":"747f3d2c-83c6-4f96-9879-821516f110f7","kind":"task","status":{"state":"submitted"}},"source":"a2a"}

data: {"type":"TEXT_MESSAGE_START","messageId":"49da8187-c907-47a8-8f27-4d1d15f26fa8","role":"assistant"}

data: {"type":"TEXT_MESSAGE_CONTENT","messageId":"49da8187-c907-47a8-8f27-4d1d15f26fa8","delta":"Right,I can help you mark user info。"}

data: {"type":"ACTIVITY_SNAPSHOT","messageId":"edit-form-1701389476","activityType":"a2ui-surface","content":{"operations":[]},"replace":false}

data: {"type":"ACTIVITY_DELTA","messageId":"edit-form-1701389476","activityType":"a2ui-surface","patch":[{"op":"add","path":"/operations/-","value":{"beginRendering":{"surfaceId":"edit-form-1701389476","root":"root","styles":{"primaryColor":"#3b82f6"}}}}]}

data: {"type":"ACTIVITY_DELTA","messageId":"edit-form-1701389476","activityType":"a2ui-surface","patch":[{"op":"add","path":"/operations/-","value":{"surfaceUpdate":{"surfaceId":"edit-form-1701389476","components":[{"id":"root","component":{"Card":{"child":"content"}}},{"id":"content","component":{"Column":{"children":{"explicitList":["title","divider1","fields","divider2","btn"]}}}},{"id":"title","component":{"Text":{"usageHint":"h2","text":{"literalString":"✏️ User Info Mark"}}}},{"id":"divider1","component":{"Divider":{}}},{"id":"fields","component":{"Column":{"children":{"explicitList":["f1","f2","f3"]}}}},{"id":"f1","component":{"TextField":{"label":{"literalString":"name"},"text":{"path":"name"}}}},{"id":"f2","component":{"TextField":{"label":{"literalString":"IdNo"},"text":{"path":"idNumber"}}}},{"id":"f3","component":{"TextField":{"label":{"literalString":"phone"},"text":{"path":"phone"}}}},{"id":"divider2","component":{"Divider":{}}},{"id":"btn","component":{"Button":{"child":"btn-text","primary":true,"action":{"name":"submit","context":[{"key":"name","value":{"path":"name"}},{"key":"idNumber","value":{"path":"idNumber"}},{"key":"phone","value":{"path":"phone"}}]}}}},{"id":"btn-text","component":{"Text":{"text":{"literalString":"submit"}}}}]}}}]}

data: {"type":"ACTIVITY_DELTA","messageId":"edit-form-1701389476","activityType":"a2ui-surface","patch":[{"op":"add","path":"/operations/-","value":{"dataModelUpdate":{"surfaceId":"edit-form-1701389476","path":"/","contents":[{"key":"name","valueString":""},{"key":"idNumber","valueString":""},{"key":"phone","valueString":""}]}}}]}

data: {"type":"TEXT_MESSAGE_END","messageId":"49da8187-c907-47a8-8f27-4d1d15f26fa8"}

data: {"type":"RUN_FINISHED","threadId":"7b6928a1-5bbf-405a-aeb8-0a8106ed2534","runId":"4447e661-e4fb-4fda-9fdf-8df2f9693bc8"}

```
---

This is my agent sse response,from llm translate to a2ui, but in my agent, there are many tool will be called, an some reasoning info I want to show, how can I send those type message?

It seems just support Part, TextPart, FilePart, DataPart in A2UI, send it with DataPart?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.