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
update: updating Spring AI tutorial for 1.0.0 release (#4889)
* update: updating docs for 1.0.0 spring ai version
* update: update spring ai tutorial with 1.0.0 changes
* adding updates
* fixing indendation
* adding java 17 tip to spring ai tutorial
// Sends the prompt to the LLM with the retrieval advisor and get the response
321
-
val response = chatClient.prompt(prompt)
322
-
.advisors(retrievalAdvisor)
323
-
.call()
324
-
.content()
325
-
logger.info("Chat response generated for query: '${request.query}'")
326
-
return response
327
-
}
320
+
.promptTemplate(promptTemplate)
321
+
.build()
322
+
323
+
// Sends the prompt to the LLM with the retrieval advisor and retrieves the generated content
324
+
val response = chatClient.prompt(prompt)
325
+
.advisors(retrievalAdvisor)
326
+
.call()
327
+
.content()
328
+
logger.info("Chat response generated for query: '${request.query}'")
329
+
return response
330
+
}
328
331
```
329
332
330
-
5. Run the application.
331
-
6. In the terminal, send a POST request to the new endpoint to see the results:
333
+
6. Run the application.
334
+
7. In the terminal, send a POST request to the new endpoint to see the results:
332
335
333
336
```bash
334
337
curl -X POST "http://localhost:8080/kotlin/chat/ask" \
@@ -342,5 +345,5 @@ Congratulations! You now have a Kotlin app that connects to OpenAI and answers q
342
345
documentation stored in Qdrant.
343
346
Try experimenting with different queries or importing other documents to explore more possibilities.
344
347
345
-
You can view the completed project in the [Spring AI demo GitHub repository](https://github.com/Kotlin/Kotlin-AI-Examples/tree/master/projects/spring-ai/springAI-demo),
348
+
You can view the completed project in the [Spring AI demo GitHub repository](https://github.com/Kotlin/Kotlin-AI-Examples/tree/master/projects/spring-ai/springAI-demo),
346
349
or explore other Spring AI examples in [Kotlin AI Examples](https://github.com/Kotlin/Kotlin-AI-Examples/tree/master).
0 commit comments