spring-projects / spring-projects/spring-ai
Automatically generate conversionId and return suggestions in the message body
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Suggestion to automatically generate conversionId and return it in the message body. For example, in the following code, the conversionId needs to be specified first. If the user does not provide a conversionId, it needs to be generated by the backend. If stream() is used, how can the frontend obtain the conversionId generated by the backend? It is recommended to be consistent with OpenAI. If the user does not pass it, it will be automatically generated and this property will be added to the chatResponse
`String conversationId = "007";
chatClient.prompt()
.user("Do I have license to code?")
.advisors(a -> a.param(ChatMemory.CONVERSATION_ID, conversationId))
.call()
.content();
`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the ChatClient prompt flow shown in the issue and trace how ChatMemory.CONVERSATION_ID, stream(), and chatResponse are handled. Done means a missing conversionId is generated by the backend and returned in the message body, including for streaming responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100