docs: minor adivsor docs update
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
@@ -13,15 +13,16 @@ You can configure existing advisors using the xref:api/chatclient.adoc#_advisor_
|
||||
----
|
||||
var chatClient = ChatClient.builder(chatModel)
|
||||
.defaultAdvisors(
|
||||
new MessageChatMemoryAdvisor(chatMemory), // chat-memory advisor
|
||||
new QuestionAnswerAdvisor(vectorStore) // RAG advisor
|
||||
MessageChatMemoryAdvisor.builder(chatMemory).build(), // chat-memory advisor
|
||||
QuestionAnswerAdvisor.builder((vectorStore).builder() // RAG advisor
|
||||
)
|
||||
.build();
|
||||
|
||||
var conversationId = "678";
|
||||
|
||||
String response = this.chatClient.prompt()
|
||||
// Set advisor parameters at runtime
|
||||
.advisors(advisor -> advisor.param("chat_memory_conversation_id", "678")
|
||||
.param("chat_memory_response_size", 100))
|
||||
// Set advisor parameters at runtime
|
||||
.advisors(advisor -> advisor.param(ChatMemory.CONVERSATION_ID, conversationId))
|
||||
.user(userText)
|
||||
.call()
|
||||
.content();
|
||||
@@ -31,7 +32,8 @@ It is recommend to register the advisors at build time using builder's `defaultA
|
||||
|
||||
Advisors also participate in the Observability stack, so you can view metrics and traces related to their execution.
|
||||
|
||||
xref:ROOT:api/retrieval-augmented-generation.adoc#_questionansweradvisor[Learn about Question Answer Advisor]
|
||||
- xref:ROOT:api/retrieval-augmented-generation.adoc#_questionansweradvisor[Learn about Question Answer Advisor]
|
||||
- xref:ROOT:api/chat-memory.adoc#_memory_in_chat_client[Learn about Chat Memory Advisor]
|
||||
|
||||
== Core Components
|
||||
|
||||
|
||||
Reference in New Issue
Block a user