a2aproject / a2aproject/a2a-samples

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

Aberta Para iniciantes
#407 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Jupyter Notebook
Estrelas
1.8k
Forks
751
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

示例:

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
}
```

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Look at the custom_java_impl example in the a2a-samples repository. The issue is that the 'kind' field in the 'parts' array of the history response is null instead of 'text'. Find the Java code that serializes the response, likely in a model class or a serializer for the message parts. Compare the request and response structures to ensure the 'kind' field is properly set. Run the example to reproduce the issue and verify the fix.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
java, json
Domínio
api, backend
Tipo de issue
Bug
Dificuldade
2/5
Tempo estimado
1-3 horas
Status de atividade
Estagnada
Clareza
Claramente especificada
Facilidade para iniciantes
70/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.