before moving into chatclient

This commit is contained in:
Mark Pollack
2024-05-16 18:37:25 +02:00
parent 2f570a9156
commit 7e414731e4
2 changed files with 8 additions and 6 deletions

View File

@@ -28,10 +28,11 @@ public class OpenAiChatClientFluentIT {
void simpleTest() {
var liquidChatClient = new FluentChatClient.LiquidChatClient(this.chatClient);
var actors = liquidChatClient
.chat(s -> s.system(sys -> sys.text("""
You're a non user hostile chatbot from cyberdyne systems.
your primary objective is {primaryObjective}
""").params(Map.of("primaryObjective", "No PHP")))
.chat(s -> s.system(sys ->
sys.text("""
You're a non user hostile chatbot from cyberdyne systems.
your primary objective is {primaryObjective}""")
.params(Map.of("primaryObjective", "No PHP")))
.functions(fn -> fn.functions((FunctionCallback) null)
.functions("createReservation", "cancelReservations"))
.user(user -> user.text("tell me a joke about {topic}")

View File

@@ -2,6 +2,7 @@ package org.springframework.ai.chat;
import org.springframework.ai.chat.messages.Media;
import org.springframework.ai.model.function.FunctionCallback;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.Resource;
import org.springframework.util.MimeType;
@@ -142,11 +143,11 @@ public class FluentChatClient {
public static class LiquidChatCallSpec {
public <T> T call(T... ts) {
public <T> T call(Class<T> tClass) {
return null;
}
public <T> T call(Class<T> tClass) {
public <T> T call(ParameterizedTypeReference<T> typeReference) {
return null;
}