Package dev.langchain4j.model.ollama
Class OllamaStreamingChatModel
java.lang.Object
dev.langchain4j.model.ollama.OllamaStreamingChatModel
- All Implemented Interfaces:
dev.langchain4j.model.chat.StreamingChatLanguageModel
public class OllamaStreamingChatModel
extends Object
implements dev.langchain4j.model.chat.StreamingChatLanguageModel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionOllamaStreamingChatModel(dev.langchain4j.http.client.HttpClientBuilder httpClientBuilder, String baseUrl, String modelName, Double temperature, Integer topK, Double topP, Double repeatPenalty, Integer seed, Integer numPredict, Integer numCtx, List<String> stop, String format, dev.langchain4j.model.chat.request.ResponseFormat responseFormat, Duration timeout, Boolean logRequests, Boolean logResponses, Map<String, String> customHeaders, List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners, Set<dev.langchain4j.model.chat.Capability> supportedCapabilities) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()voidgenerate(List<dev.langchain4j.data.message.ChatMessage> messages, dev.langchain4j.model.StreamingResponseHandler<dev.langchain4j.data.message.AiMessage> handler) voidgenerate(List<dev.langchain4j.data.message.ChatMessage> messages, List<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications, dev.langchain4j.model.StreamingResponseHandler<dev.langchain4j.data.message.AiMessage> handler) Set<dev.langchain4j.model.chat.Capability> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.langchain4j.model.chat.StreamingChatLanguageModel
chat, chat, chat, defaultRequestParameters, doChat, generate, generate, generate, listeners
-
Constructor Details
-
OllamaStreamingChatModel
public OllamaStreamingChatModel(dev.langchain4j.http.client.HttpClientBuilder httpClientBuilder, String baseUrl, String modelName, Double temperature, Integer topK, Double topP, Double repeatPenalty, Integer seed, Integer numPredict, Integer numCtx, List<String> stop, String format, dev.langchain4j.model.chat.request.ResponseFormat responseFormat, Duration timeout, Boolean logRequests, Boolean logResponses, Map<String, String> customHeaders, List<dev.langchain4j.model.chat.listener.ChatModelListener> listeners, Set<dev.langchain4j.model.chat.Capability> supportedCapabilities)
-
-
Method Details
-
builder
-
generate
public void generate(List<dev.langchain4j.data.message.ChatMessage> messages, dev.langchain4j.model.StreamingResponseHandler<dev.langchain4j.data.message.AiMessage> handler) - Specified by:
generatein interfacedev.langchain4j.model.chat.StreamingChatLanguageModel
-
generate
public void generate(List<dev.langchain4j.data.message.ChatMessage> messages, List<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications, dev.langchain4j.model.StreamingResponseHandler<dev.langchain4j.data.message.AiMessage> handler) - Specified by:
generatein interfacedev.langchain4j.model.chat.StreamingChatLanguageModel
-
supportedCapabilities
- Specified by:
supportedCapabilitiesin interfacedev.langchain4j.model.chat.StreamingChatLanguageModel
-