public class OllamaClient extends AiBaseClient
| 构造器和说明 |
|---|
OllamaClient(OllamaAccount ollamaAccount) |
OllamaClient(OllamaAccount ollamaAccount,
okhttp3.OkHttpClient okHttpClient) |
OllamaClient(String modelName,
OllamaAccount ollamaAccount) |
OllamaClient(String modelName,
OllamaAccount ollamaAccount,
okhttp3.OkHttpClient okHttpClient) |
getDefaultClientpublic OllamaClient(OllamaAccount ollamaAccount)
public OllamaClient(String modelName, OllamaAccount ollamaAccount)
public OllamaClient(OllamaAccount ollamaAccount, okhttp3.OkHttpClient okHttpClient)
public OllamaClient(String modelName, OllamaAccount ollamaAccount, okhttp3.OkHttpClient okHttpClient)
public OllamaTextResponse chat(String message) throws IOException
IOExceptionpublic OllamaTextResponse chat(String message, OllamaGenerationConfig generationConfig) throws IOException
IOExceptionpublic OllamaTextResponse chat(String message, List<OllamaChatHistory> history) throws IOException
IOExceptionpublic OllamaTextResponse chat(String message, OllamaGenerationConfig generationConfig, List<OllamaChatHistory> history) throws IOException
IOExceptionpublic OllamaTextResponse chat(String message, String[] images) throws IOException
IOExceptionpublic OllamaTextResponse chat(String message, String[] images, OllamaGenerationConfig generationConfig, List<OllamaChatHistory> history) throws IOException
IOExceptionpublic void stream(String message, OllamaStreamResponseListener responseListener) throws IOException
IOExceptionpublic void stream(String message, OllamaGenerationConfig generationConfig, OllamaStreamResponseListener responseListener) throws IOException
IOExceptionpublic void stream(String message, List<OllamaChatHistory> history, OllamaStreamResponseListener responseListener) throws IOException
IOExceptionpublic void stream(String message, OllamaGenerationConfig generationConfig, List<OllamaChatHistory> history, OllamaStreamResponseListener responseListener) throws IOException
IOExceptionpublic void stream(String message, String[] images, OllamaGenerationConfig generationConfig, List<OllamaChatHistory> history, OllamaStreamResponseListener responseListener) throws IOException
IOExceptionCopyright © 2024. All rights reserved.