Package dev.langchain4j.model.ollama
Class OllamaLanguageModel
java.lang.Object
dev.langchain4j.model.ollama.OllamaLanguageModel
- All Implemented Interfaces:
LanguageModel
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionOllamaLanguageModel
(String baseUrl, String modelName, Double temperature, Integer topK, Double topP, Double repeatPenalty, Integer seed, Integer numPredict, Integer numCtx, List<String> stop, String format, Duration timeout, Integer maxRetries, Boolean logRequests, Boolean logResponses, Map<String, String> customHeaders) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.language.LanguageModel
generate
-
Constructor Details
-
OllamaLanguageModel
public OllamaLanguageModel(String baseUrl, String modelName, Double temperature, Integer topK, Double topP, Double repeatPenalty, Integer seed, Integer numPredict, Integer numCtx, List<String> stop, String format, Duration timeout, Integer maxRetries, Boolean logRequests, Boolean logResponses, Map<String, String> customHeaders)
-
-
Method Details
-
generate
Description copied from interface:LanguageModel
Generate a response to the given prompt.- Specified by:
generate
in interfaceLanguageModel
- Parameters:
prompt
- the prompt.- Returns:
- the response.
-
builder
-