Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复ChatMessag role字段重复问题 #56

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Conversation

funs690
Copy link
Contributor

@funs690 funs690 commented Aug 8, 2024

No description provided.

@Lambdua
Copy link
Owner

Lambdua commented Aug 8, 2024

这里更改是为了什么呢,更改后,单元测试是否跑过

@funs690
Copy link
Contributor Author

funs690 commented Aug 8, 2024

{ "index": 0, "message": { "role": "assistant", "role": "assistant", "content": null, "name": null, "tool_calls": null, "function_call": null }, "logprobs": null, "finish_reason": "stop" }

使用Java多态实现了根据不同role实现不同类型的反序列化,但是在序列化转Json的时候会出现key重复,如上所示

@funs690
Copy link
Contributor Author

funs690 commented Aug 8, 2024

这里ChatMessage接口定义了getRole()接口,本身已经自带role属性,然后又在include 中去指定,导致getRole被引入了两次

@Lambdua
Copy link
Owner

Lambdua commented Aug 9, 2024

thanks

@Lambdua Lambdua merged commit 8dff095 into Lambdua:main Aug 9, 2024
@Lambdua
Copy link
Owner

Lambdua commented Aug 9, 2024

等openai开完大会.应该会上新特新,会连带着在下个大版本更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants