Class MistralAiFimModel

java.lang.Object
dev.langchain4j.model.mistralai.MistralAiFimModel
All Implemented Interfaces:
LanguageModel

public class MistralAiFimModel extends Object implements LanguageModel
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.

This model will then generate the text/code that fits in between.

You can find description of parameters here.

  • Constructor Details

  • Method Details

    • generate

      public Response<String> generate(String prompt, String suffix)
      Generates a completion for the given prompt and suffix.
      Parameters:
      prompt - the starting point of the text/code
      suffix - 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.
      Returns:
      a response containing the generated text/code
    • generate

      public Response<String> generate(String prompt)
      Generates a completion for the given prompt.
      Specified by:
      generate in interface LanguageModel
      Parameters:
      prompt - the starting point of the text/code
      Returns:
      a response containing the generated text/code
    • builder

      public static MistralAiFimModel.Builder builder()