Google Gemini is a family of multimodal AI models developed by Google. It is designed to process and generate various forms of content, including text, images, and potentially audio and video. Gemini is considered one of Google's most capable and general models, with potential applications ranging from chatbots and virtual assistants to creative tools and search enhancements. Notably, Gemini excels in coding tasks, ranking among the leading foundation models for code generation. The models are being integrated into various Google products and services, aiming to enhance user experiences across platforms and applications.
gemini
const { LLMInterface } = require('llm-interface');
LLMInterface.setApiKey({'gemini': process.env.GEMINI_API_KEY});
async function main() {
try {
const response = await LLMInterface.sendMessage('gemini', 'Explain the importance of low latency LLMs.');
console.log(response.results);
} catch (error) {
console.error(error);
throw error;
}
}
main();
The following model aliases are provided for this provider.
default
: gemini-1.5-flashlarge
: gemini-1.5-prosmall
: gemini-1.5-flashagent
: gemini-1.5-pro
default
: text-embedding-004large
: text-embedding-004small
: text-embedding-004
The following parameters can be passed through options
.
candidateCount
: Details not available, please refer to the LLM provider documentation.max_tokens
: The maximum number of tokens that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length.stopSequences
: Details not available, please refer to the LLM provider documentation.temperature
: Controls the randomness of the AI's responses. A higher temperature results in more random outputs, while a lower temperature makes the output more focused and deterministic. Generally, it is recommended to alter this or top_p, but not both.topK
: Details not available, please refer to the LLM provider documentation.topP
: Details not available, please refer to the LLM provider documentation.
- Native JSON Mode
- Streaming
- Embeddings
Free: The Gemini API is currently free to use.
To get an API key, first create a Google Gemini account, then visit the link below.
Google Gemini documentation is available here.