WeaviateEx.Integrations (WeaviateEx v0.7.4)
View SourceAPI integration header builders for external AI providers.
Weaviate uses custom HTTP headers to pass API keys for various AI service integrations (vectorizers, generative modules, rerankers).
Examples
# Single provider
headers = Integrations.openai(api_key: "sk-...")
# Multiple providers
headers = Integrations.merge([
Integrations.openai(api_key: "sk-..."),
Integrations.cohere(api_key: "cohere-key"),
Integrations.huggingface(api_key: "hf-key")
])
# Use with client
WeaviateEx.Client.new(
base_url: "http://localhost:8080",
headers: headers
)
Summary
Functions
Anthropic integration headers.
AWS integration headers.
Azure OpenAI integration headers.
Cohere integration headers.
Databricks integration headers.
Google/Vertex AI integration headers.
HuggingFace integration headers.
JinaAI integration headers.
Merge multiple integration header lists.
Mistral integration headers.
NVIDIA integration headers.
OpenAI integration headers.
VoyageAI integration headers.
Types
Functions
Anthropic integration headers.
Options
:api_key- Anthropic API key (required)
Examples
Integrations.anthropic(api_key: "anthropic-key")
AWS integration headers.
Options
:access_key- AWS access key ID (required):secret_key- AWS secret access key (required):session_token- AWS session token (optional, for temporary credentials)
Examples
Integrations.aws(access_key: "AKIA...", secret_key: "secret")
Integrations.aws(access_key: "AKIA...", secret_key: "secret", session_token: "token")
Azure OpenAI integration headers.
Options
:api_key- Azure OpenAI API key (required)
Examples
Integrations.azure_openai(api_key: "azure-key")
Cohere integration headers.
Options
:api_key- Cohere API key (required):requests_per_minute_embeddings- Rate limit for embedding requests per minute (optional):base_url- Custom base URL for the API (optional)
Examples
Integrations.cohere(api_key: "cohere-key")
Integrations.cohere(api_key: "cohere-key", requests_per_minute_embeddings: 1000)
Databricks integration headers.
Options
:token- Databricks access token (required)
Examples
Integrations.databricks(token: "dapi...")
Google/Vertex AI integration headers.
Options
:api_key- Google API key (required):vertex- Set to true for Vertex AI (optional)
Examples
Integrations.google(api_key: "google-key")
Integrations.google(api_key: "google-key", vertex: true)
HuggingFace integration headers.
Options
:api_key- HuggingFace API key (required)
Examples
Integrations.huggingface(api_key: "hf-key")
JinaAI integration headers.
Options
:api_key- JinaAI API key (required)
Examples
Integrations.jinaai(api_key: "jina-key")
Merge multiple integration header lists.
Examples
headers = Integrations.merge([
Integrations.openai(api_key: "sk-..."),
Integrations.cohere(api_key: "cohere-key")
])
Mistral integration headers.
Options
:api_key- Mistral API key (required)
Examples
Integrations.mistral(api_key: "mistral-key")
NVIDIA integration headers.
Options
:api_key- NVIDIA API key (required)
Examples
Integrations.nvidia(api_key: "nvidia-key")
OpenAI integration headers.
Options
:api_key- OpenAI API key (required):organization- OpenAI organization ID (optional):requests_per_minute_embeddings- Rate limit for embedding requests per minute (optional):tokens_per_minute_embeddings- Rate limit for tokens per minute for embeddings (optional):base_url- Custom base URL for the API (optional)
Examples
Integrations.openai(api_key: "sk-...")
Integrations.openai(api_key: "sk-...", organization: "org-123")
Integrations.openai(api_key: "sk-...", requests_per_minute_embeddings: 3000)
VoyageAI integration headers.
Options
:api_key- VoyageAI API key (required)
Examples
Integrations.voyageai(api_key: "voyage-key")