feat: add chat with string prompt for LLM

This commit is contained in:
michael 2024-01-21 16:07:29 +08:00
parent 933ae73e16
commit fe5d22b01e

View File

@ -17,9 +17,13 @@ package com.agentsflex.llm;
import com.agentsflex.client.LlmClient;
import com.agentsflex.prompt.Prompt;
import com.agentsflex.prompt.SimplePrompt;
public abstract class Llm implements Embeddings{
public abstract class Llm implements Embeddings {
public LlmClient chat(String prompt, ChatListener listener) {
return chat(new SimplePrompt(prompt), listener);
}
public abstract LlmClient chat(Prompt prompt, ChatListener listener);