import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.mistralai.MistralAiChatModel;

public class MistralAiChatModelExamples {

    static class Simple_Prompt {

        public static void main(String[] args) {

            ChatLanguageModel model = MistralAiChatModel.builder()
                    .apiKey(System.getenv("MISTRAL_AI_API_KEY")) // Please use your own Mistral AI API key
                    .modelName("mistral-small")
                    .logRequests(true)
                    .logResponses(true)
                    .build();

            String joke = model.generate("Tell me a joke about Java");

            System.out.println(joke);
        }
    }
}

dev.langchain4j.model.mistralai.MistralAiChatModel.builder
[((278, 569), 'dev.langchain4j.model.mistralai.MistralAiChatModel.builder'), ((278, 540), 'dev.langchain4j.model.mistralai.MistralAiChatModel.builder'), ((278, 500), 'dev.langchain4j.model.mistralai.MistralAiChatModel.builder'), ((278, 461), 'dev.langchain4j.model.mistralai.MistralAiChatModel.builder'), ((278, 371), 'dev.langchain4j.model.mistralai.MistralAiChatModel.builder')]