Package dev.langchain4j.model.mistralai
Class MistralAiStreamingFimModel
java.lang.Object
dev.langchain4j.model.mistralai.MistralAiStreamingFimModel
- All Implemented Interfaces:
StreamingLanguageModel
Represents a Mistral AI FIM Completion Model with a language completion interface, users can define the starting point of the text/code using a prompt, and the ending point of the text/code using an optional suffix and an optional stop.
The model's response is streamed token by token and should be handled with StreamingResponseHandler
.
You can find description of parameters here.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
void
generate
(String prompt, StreamingResponseHandler<String> handler) Generates a completion for the given prompt.void
generate
(String prompt, String suffix, StreamingResponseHandler<String> handler) Generates a completion for the given prompt and suffix.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.StreamingLanguageModel
generate
-
Constructor Details
-
MistralAiStreamingFimModel
-
-
Method Details
-
generate
Generates a completion for the given prompt and suffix.- Parameters:
prompt
- the prompt to generate a completion forsuffix
- Optional text/code that adds more context for the model. When given a prompt and a suffix the model will fill what is between them.handler
- the handler to process the completion response
-
generate
Generates a completion for the given prompt.- Specified by:
generate
in interfaceStreamingLanguageModel
- Parameters:
prompt
- the prompt to generate a completion forhandler
- the handler to process the completion response
-
builder
-