Package ai.optfor.springopenaiapi
Class OpenAIApi
java.lang.Object
ai.optfor.springopenaiapi.OpenAIApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchat(LLMModel model, String system, String user, Integer maxTokens, double temperature, boolean jsonMode, String openaiKey) chat(LLMModel model, String system, String user, String assistant, Integer maxTokens, double temperature, boolean jsonMode, String openaiKey) chat(LLMModel model, List<ChatMessage> chats, int maxTokens, double temperature, boolean jsonMode, String openaiKey) byte[]createSpeech(TTSModel model, String input, TTSVoice voice, String openaiKey) embedding(EmbedModel model, String content, String openaiKey) embedding(EmbedModel model, List<String> content, String openaiKey) reactor.core.publisher.Flux<String>streamingChat(LLMModel model, String system, String user, String assistant, Integer maxTokens, double temperature, String openaiKey) reactor.core.publisher.Flux<String>streamingChat(LLMModel model, List<ChatMessage> messages, Integer maxTokens, double temperature, String openaiKey) transcribeAudio(byte[] audioBytes, String languageKey, String openaiKey) vision(LLMModel model, List<VisionMessage> messages, Integer maxTokens, double temperature, String openaiKey) reactor.core.publisher.Flux<String>visionStreaming(LLMModel model, List<VisionMessage> messages, Integer maxTokens, double temperature, String openaiKey)
-
Constructor Details
-
OpenAIApi
-
-
Method Details
-
streamingChat
-
streamingChat
-
vision
public ChatCompletionResponse vision(LLMModel model, List<VisionMessage> messages, Integer maxTokens, double temperature, String openaiKey) -
visionStreaming
-
createSpeech
-
transcribeAudio
-
chat
-
chat
-
chat
public ChatCompletionResponse chat(LLMModel model, List<ChatMessage> chats, int maxTokens, double temperature, boolean jsonMode, String openaiKey) -
embedding
-
embedding
-