package org.example;

import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.huggingface.HuggingFaceChatModel;
import dev.langchain4j.model.huggingface.HuggingFaceModelName;
import dev.langchain4j.model.openai.OpenAiChatModel;
import dev.langchain4j.model.openai.OpenAiChatModelName;

public class _02_Builder {

    public static void main(String[] args) {

        ChatLanguageModel openAI = OpenAiChatModel.builder()
                .apiKey(ApiKeys.OPENAI_DEMO)
                .modelName(OpenAiChatModelName.GPT_4)
                .temperature(0.3d)
                .maxTokens(50)
                .logRequests(true)
                .logResponses(true)
                .maxRetries(3)
                .build();

        ChatLanguageModel huggingFace = HuggingFaceChatModel.builder()
                .accessToken(ApiKeys.OPENAI_DEMO)
                .modelId(HuggingFaceModelName.TII_UAE_FALCON_7B_INSTRUCT)
                .temperature(0.3d)
                .build();
    }
}

dev.langchain4j.model.huggingface.HuggingFaceChatModel.builder dev.langchain4j.model.openai.OpenAiChatModel.builder
[((421, 738), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((421, 713), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((421, 682), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((421, 646), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((421, 611), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((421, 580), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((421, 545), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((421, 491), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((781, 995), 'dev.langchain4j.model.huggingface.HuggingFaceChatModel.builder'), ((781, 970), 'dev.langchain4j.model.huggingface.HuggingFaceChatModel.builder'), ((781, 935), 'dev.langchain4j.model.huggingface.HuggingFaceChatModel.builder'), ((781, 861), 'dev.langchain4j.model.huggingface.HuggingFaceChatModel.builder')]