You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
The example code in the documentation for Spring AI currently labels the response key as "generation" in a curl command example. However, the correct key should be "completion" to match the actual API response format. https://docs.spring.io/spring-ai/reference/api/chatclient.html
Environment
Spring AI version: [Provide version here, e.g., 1.0.0]
Java version: [Provide Java version here, e.g., 11]
Vector Store: N/A
Steps to reproduce
Configure the ChatClient as shown in the documentation example.
Start the Spring application and make a request to the /ai/simple endpoint using curl localhost:8080/ai/simple.
Observe the response key, which is labeled "generation" instead of the expected "completion".
Expected behavior
The response should use "completion" as the key to accurately reflect the API response format.
Minimal Complete Reproducible example
The issue can be reproduced by using the example configuration in the documentation. The curl command will output:
{"generation": "Why did the pirate go to the comedy club? To hear some arrr-rated jokes! Arrr, matey!"}
but should output:
{"completion": "Why did the pirate go to the comedy club? To hear some arrr-rated jokes! Arrr, matey!"}
Thank you for reviewing this issue!
The text was updated successfully, but these errors were encountered:
Bug description
The example code in the documentation for Spring AI currently labels the response key as
"generation"
in a curl command example. However, the correct key should be"completion"
to match the actual API response format.https://docs.spring.io/spring-ai/reference/api/chatclient.html
Environment
Steps to reproduce
ChatClient
as shown in the documentation example./ai/simple
endpoint usingcurl localhost:8080/ai/simple
."generation"
instead of the expected"completion"
.Expected behavior
The response should use
"completion"
as the key to accurately reflect the API response format.Minimal Complete Reproducible example
The issue can be reproduced by using the example configuration in the documentation. The curl command will output:
but should output:
Thank you for reviewing this issue!
The text was updated successfully, but these errors were encountered: