Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions docs/en/guides/01-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Embedding model configuration for vector search, supporting dense, sparse, and h
| Parameter | Type | Description |
|-----------|------|-------------|
| `max_concurrent` | int | Maximum concurrent embedding requests (`embedding.max_concurrent`, default: `10`) |
| `provider` | str | `"volcengine"`, `"openai"`, `"vikingdb"`, `"jina"`, or `"voyage"` |
| `provider` | str | `"volcengine"`, `"openai"`, `"vikingdb"`, `"jina"`, `"voyage"`, or `"google"` |
| `api_key` | str | API key |
| `model` | str | Model name |
| `dimension` | int | Vector dimension. For Voyage, this maps to `output_dimension` |
Expand All @@ -124,10 +124,11 @@ Embedding model configuration for vector search, supporting dense, sparse, and h

**Available Models**

| Model | Dimension | Input Type | Notes |
|-------|-----------|------------|-------|
| `doubao-embedding-vision-250615` | 1024 | multimodal | Recommended |
| `doubao-embedding-250615` | 1024 | text | Text only |
| Provider | Model | Dimension | Input Type | Notes |
|----------|-------|-----------|------------|-------|
| `volcengine` | `doubao-embedding-vision-250615` | 1024 | multimodal | Recommended |
| `volcengine` | `doubao-embedding-250615` | 1024 | text | Text only |
| `google` | `gemini-embedding-2-preview` | 3072 | text | Google Gemini Embedding 2 with MRL |

With `input: "multimodal"`, OpenViking can embed text, images (PNG, JPG, etc.), and mixed content.

Expand All @@ -137,6 +138,7 @@ With `input: "multimodal"`, OpenViking can embed text, images (PNG, JPG, etc.),
- `vikingdb`: VikingDB Embedding API
- `jina`: Jina AI Embedding API
- `voyage`: Voyage AI Embedding API
- `google`: Google/Gemini AI Embedding API

**vikingdb provider example:**

Expand Down Expand Up @@ -192,6 +194,29 @@ Get your API key at https://jina.ai
}
```

**google provider example:**

```json
{
"embedding": {
"dense": {
"provider": "google",
"api_key": "your-google-api-key",
"model": "gemini-embedding-2-preview",
"dimension": 1024,
"query_param": "RETRIEVAL_QUERY",
"document_param": "RETRIEVAL_DOCUMENT"
}
}
}
```

For Google/Gemini embeddings:
- `query_param` and `document_param` support task-specific embeddings
- Valid task types: `RETRIEVAL_QUERY`, `RETRIEVAL_DOCUMENT`, `SEMANTIC_SIMILARITY`, `CLASSIFICATION`, `CLUSTERING`
- Enhanced format: `"task_type=RETRIEVAL_QUERY,output_dimensionality=1024"`
- Get your API key at https://aistudio.google.com/app/apikey

Supported Voyage text embedding models include:
- `voyage-4-lite`
- `voyage-4`
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guides/01-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ OpenViking 使用 JSON 配置文件(`ov.conf`)进行设置。配置文件支
| 参数 | 类型 | 说明 |
|------|------|------|
| `max_concurrent` | int | 最大并发 Embedding 请求数(`embedding.max_concurrent`,默认:`10`) |
| `provider` | str | `"volcengine"`、`"openai"`、`"vikingdb"` 或 `"jina"` |
| `provider` | str | `"volcengine"`、`"openai"`、`"vikingdb"`、`"jina"`、`"voyage"` 或 `"google"` |
| `api_key` | str | API Key |
| `model` | str | 模型名称 |
| `dimension` | int | 向量维度 |
Expand Down
6 changes: 5 additions & 1 deletion openviking/models/embedder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Volcengine: Dense, Sparse, Hybrid
- Jina AI: Dense only
- Voyage AI: Dense only
- Google/Gemini: Dense only
"""

from openviking.models.embedder.base import (
Expand All @@ -23,9 +24,9 @@
HybridEmbedderBase,
SparseEmbedderBase,
)
from openviking.models.embedder.google_embedders import GoogleDenseEmbedder
from openviking.models.embedder.jina_embedders import JinaDenseEmbedder
from openviking.models.embedder.openai_embedders import OpenAIDenseEmbedder
from openviking.models.embedder.voyage_embedders import VoyageDenseEmbedder
from openviking.models.embedder.vikingdb_embedders import (
VikingDBDenseEmbedder,
VikingDBHybridEmbedder,
Expand All @@ -36,6 +37,7 @@
VolcengineHybridEmbedder,
VolcengineSparseEmbedder,
)
from openviking.models.embedder.voyage_embedders import VoyageDenseEmbedder

__all__ = [
# Base classes
Expand All @@ -45,6 +47,8 @@
"SparseEmbedderBase",
"HybridEmbedderBase",
"CompositeHybridEmbedder",
# Google/Gemini implementations
"GoogleDenseEmbedder",
# Jina AI implementations
"JinaDenseEmbedder",
# OpenAI implementations
Expand Down
Loading
Loading