import dev.ai4j.openai4j.Model;
import dev.langchain4j.data.message.UserMessage;
import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.openai.OpenAiChatModel;

public class _00_Model {

    public static void main(String[] args) {

        String openAiKey = System.getenv("OPENAI_API_KEY");

        ChatLanguageModel chatModel = OpenAiChatModel.builder()
                .modelName(Model.GPT_3_5_TURBO.stringValue())
                .apiKey(openAiKey)
                .build();

        var prompt = "Write hello world example in Java printing 'Hello TDC Future 2023'";
        var response = chatModel.generate(UserMessage.from(prompt));

        System.out.println(response.content().text());

        System.out.println("\n\n########### TOKEN USAGE ############\n");
        System.out.println(response.tokenUsage());
    }
}
dev.langchain4j.model.openai.OpenAiChatModel.builder
[((359, 506), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((359, 481), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((359, 446), 'dev.langchain4j.model.openai.OpenAiChatModel.builder'), ((412, 445), 'dev.ai4j.openai4j.Model.GPT_3_5_TURBO.stringValue')]