a2aproject / a2aproject/a2a-samples

custom_java_impl示例中发现 返回中history-->parts中 "kind": null, 是null有问题啊。 正确的应该是"kind": "text"

未关闭
#407 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Jupyter Notebook
星标
1.8k
派生
751
PR 合并指标
30 天内没有已合并 PR

描述

示例:

client请求:
```
{
"id": "7981a512-3096-433e-a2c9-63fdfba1522a",
"jsonrpc": "2.0",
"method": "message/send",
"params": {
"id": "german-cancel-task",
"sessionId": null,
"message": {
"messageId": "b46b3722-8cd7-47d0-9914-d86895a707bf",
"kind": "message",
"role": "user",
"parts": [
{
"kind": "text",
"text": "美丽 翻译成日语",
"metadata": null
},
{
"kind": "text",
"text": "美丽 翻译成韩语",
"metadata": null
},
{
"kind": "text",
"text": "美丽 翻译成英文",
"metadata": null
}
],
"contextId": null,
"taskId": null,
"referenceTaskIds": null,
"metadata": null
},
"pushNotification": null,
"historyLength": null,
"metadata": {}
}
}

```

server返回:
```
{
"id": "7981a512-3096-433e-a2c9-63fdfba1522a",
"jsonrpc": "2.0",
"result": {
"id": "german-cancel-task",
"contextId": "62d125c0-d4ad-423c-8d8a-58af5773cc38",
"kind": "task",
"status": {
"state": "COMPLETED",
"message": null,
"timestamp": "2025-11-15T07:43:28.953500Z"
},
"artifacts": null,
"history": [
{
"messageId": "b46b3722-8cd7-47d0-9914-d86895a707bf",
"kind": "message",
"role": "user",
"parts": [
{
"kind": null,
"text": "美丽 翻译成日语",
"metadata": null
},
{
"kind": null,
"text": "美丽 翻译成韩语",
"metadata": null
},
{
"kind": null,
"text": "美丽 翻译成英文",
"metadata": null
}
],
"contextId": null,
"taskId": null,
"referenceTaskIds": null,
"metadata": null
},
{
"messageId": "d9a1d1e0-88d6-4850-8d52-268b2ff2c464",
"kind": "message",
"role": "assistant",
"parts": [
{
"kind": null,
"text": "Translate 'beautiful' to Japanese\nTranslate 'beautiful' to Korean\nTranslate 'beautiful' to English",
"metadata": null
}
],
"contextId": null,
"taskId": "german-cancel-task",
"referenceTaskIds": [
"b46b3722-8cd7-47d0-9914-d86895a707bf"
],
"metadata": null
}
],
"metadata": {}
},
"error": null
}
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。