Skip to content

Commit

Permalink
feat : minor polish
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadilipkolli committed Feb 23, 2024
1 parent 9dab6ba commit 1cf2219
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.learning.ai;

import com.learning.ai.config.CustomerSupportAgent;
import com.learning.ai.config.AICustomerSupportAgent;
import java.util.Map;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
Expand All @@ -15,7 +15,7 @@ public static void main(String[] args) {
}

@Bean
ApplicationRunner interactiveChatRunner(CustomerSupportAgent agent) {
ApplicationRunner interactiveChatRunner(AICustomerSupportAgent agent) {
return args -> {
var response =
agent.chat("what should I know about the transition to consumer direct care network washington?");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
public class AIConfig {

@Bean
CustomerSupportAgent customerSupportAgent(
AICustomerSupportAgent customerSupportAgent(
ChatLanguageModel chatLanguageModel,
// ChatTools bookingTools,
ContentRetriever contentRetriever) {
return AiServices.builder(CustomerSupportAgent.class)
return AiServices.builder(AICustomerSupportAgent.class)
.chatLanguageModel(chatLanguageModel)
.chatMemory(MessageWindowChatMemory.withMaxMessages(20))
// .tools(bookingTools)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.learning.ai.config;

import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.V;

public interface CustomerSupportAgent {
public interface AICustomerSupportAgent {

@SystemMessage({
"""
Expand All @@ -19,5 +20,5 @@ public interface CustomerSupportAgent {
{documents}
"""
})
String chat(String documents);
String chat(@V("documents") String documents);
}

0 comments on commit 1cf2219

Please sign in to comment.