Package com.tnsai.llm.providers
Class GeminiClient
java.lang.Object
com.tnsai.llm.providers.AbstractLLMClient
com.tnsai.llm.providers.GeminiClient
- All Implemented Interfaces:
com.tnsai.llm.LLMClient
Google Gemini LLM client with multimodal support (text, image, audio, video).
Configuration via environment variables:
- GEMINI_API_KEY - Required API key
- GEMINI_BASE_URL - Optional, defaults to https://generativelanguage.googleapis.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGeminiClient(String model) GeminiClient(String model, float temperature) GeminiClient(String model, float temperature, Float topP, Integer maxTokens) GeminiClient(String model, float temperature, String apiKey) GeminiClient(String baseUrl, String model, float temperature, Float topP, Integer maxTokens, String apiKey) GeminiClient(String baseUrl, String model, float temperature, Integer maxTokens, String apiKey) -
Method Summary
Modifier and TypeMethodDescriptioncom.tnsai.llm.ChatResponsechat(String message, Optional<String> systemPrompt, Optional<List<Map<String, Object>>> history, Optional<List<Map<String, Object>>> tools) com.tnsai.llm.ChatResponsechat(List<com.tnsai.models.chat.ContentPart> messageParts, Optional<String> systemPrompt, Optional<List<Map<String, Object>>> history, Optional<List<Map<String, Object>>> tools) List<com.tnsai.llm.ModelInfo> Lists available Gemini models from the API.streamChat(String message, Optional<String> systemPrompt, Optional<List<Map<String, Object>>> history, Optional<List<Map<String, Object>>> tools) streamChat(List<com.tnsai.models.chat.ContentPart> messageParts, Optional<String> systemPrompt, Optional<List<Map<String, Object>>> history, Optional<List<Map<String, Object>>> tools) Methods inherited from class com.tnsai.llm.providers.AbstractLLMClient
getBaseUrl, getCallTimeoutMs, getMaxTokens, getModel, getTemperature, getTopPMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tnsai.llm.LLMClient
chat, chat, chat, chat, getCapabilities, getProviderName, streamChat, streamChatWithHandler, streamChatWithHandler, streamChatWithSpec, streamChatWithSpec
-
Constructor Details
-
GeminiClient
public GeminiClient() -
GeminiClient
-
GeminiClient
-
GeminiClient
-
GeminiClient
-
GeminiClient
-
GeminiClient
-
-
Method Details
-
chat
-
chat
-
streamChat
-
streamChat
-
listModels
Lists available Gemini models from the API.
-