Update docs
This commit is contained in:
parent
3525fae625
commit
47d8f7ba3f
4 changed files with 42 additions and 33 deletions
|
|
@ -25,8 +25,9 @@ Create a configuration file `haiku.rag.yaml`:
|
|||
environment: production
|
||||
|
||||
embeddings:
|
||||
model:
|
||||
provider: ollama
|
||||
model: nomic-embed-text
|
||||
name: nomic-embed-text
|
||||
vector_dim: 768
|
||||
|
||||
qa:
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ A minimal configuration file with defaults:
|
|||
environment: production
|
||||
|
||||
embeddings:
|
||||
model:
|
||||
provider: ollama
|
||||
model: qwen3-embedding:4b
|
||||
name: qwen3-embedding:4b
|
||||
vector_dim: 2560
|
||||
|
||||
qa:
|
||||
|
|
@ -69,8 +70,9 @@ lancedb:
|
|||
region: ""
|
||||
|
||||
embeddings:
|
||||
model:
|
||||
provider: ollama
|
||||
model: qwen3-embedding:4b
|
||||
name: qwen3-embedding:4b
|
||||
vector_dim: 2560
|
||||
|
||||
reranking:
|
||||
|
|
@ -149,7 +151,7 @@ When using haiku.rag as a Python library, you can pass configuration directly to
|
|||
|
||||
```python
|
||||
from haiku.rag.config import AppConfig
|
||||
from haiku.rag.config.models import ModelConfig, QAConfig, EmbeddingsConfig
|
||||
from haiku.rag.config.models import EmbeddingModelConfig, ModelConfig, QAConfig, EmbeddingsConfig
|
||||
from haiku.rag.client import HaikuRAG
|
||||
|
||||
# Create custom configuration
|
||||
|
|
@ -157,16 +159,16 @@ custom_config = AppConfig(
|
|||
qa=QAConfig(
|
||||
model=ModelConfig(
|
||||
provider="openai",
|
||||
model="gpt-4o",
|
||||
name="gpt-4o",
|
||||
temperature=0.7
|
||||
)
|
||||
),
|
||||
embeddings=EmbeddingsConfig(
|
||||
model=ModelConfig(
|
||||
model=EmbeddingModelConfig(
|
||||
provider="ollama",
|
||||
model="qwen3-embedding:4b"
|
||||
),
|
||||
name="qwen3-embedding:4b",
|
||||
vector_dim=2560
|
||||
)
|
||||
),
|
||||
processing={"chunk_size": 512}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -73,8 +73,9 @@ If you use Ollama, you can use any pulled model that supports embeddings.
|
|||
|
||||
```yaml
|
||||
embeddings:
|
||||
model:
|
||||
provider: ollama
|
||||
model: mxbai-embed-large
|
||||
name: mxbai-embed-large
|
||||
vector_dim: 1024
|
||||
```
|
||||
|
||||
|
|
@ -104,8 +105,9 @@ uv pip install haiku.rag-slim[voyageai]
|
|||
|
||||
```yaml
|
||||
embeddings:
|
||||
model:
|
||||
provider: voyageai
|
||||
model: voyage-3.5
|
||||
name: voyage-3.5
|
||||
vector_dim: 1024
|
||||
```
|
||||
|
||||
|
|
@ -121,8 +123,9 @@ OpenAI embeddings are included in the default installation:
|
|||
|
||||
```yaml
|
||||
embeddings:
|
||||
model:
|
||||
provider: openai
|
||||
model: text-embedding-3-small # or text-embedding-3-large
|
||||
name: text-embedding-3-small # or text-embedding-3-large
|
||||
vector_dim: 1536
|
||||
```
|
||||
|
||||
|
|
@ -138,8 +141,9 @@ For high-performance local inference, you can use vLLM to serve embedding models
|
|||
|
||||
```yaml
|
||||
embeddings:
|
||||
model:
|
||||
provider: vllm
|
||||
model: mixedbread-ai/mxbai-embed-large-v1
|
||||
name: mixedbread-ai/mxbai-embed-large-v1
|
||||
vector_dim: 512
|
||||
|
||||
providers:
|
||||
|
|
@ -155,8 +159,9 @@ providers:
|
|||
|
||||
```yaml
|
||||
embeddings:
|
||||
model:
|
||||
provider: lm_studio
|
||||
model: text-embedding-qwen3-embedding-4b
|
||||
name: text-embedding-qwen3-embedding-4b
|
||||
vector_dim: 2560
|
||||
|
||||
providers:
|
||||
|
|
|
|||
|
|
@ -33,8 +33,9 @@ Configure haiku.rag to use OpenAI. Create a `haiku.rag.yaml` file:
|
|||
|
||||
```yaml
|
||||
embeddings:
|
||||
model:
|
||||
provider: openai
|
||||
model: text-embedding-3-small # or text-embedding-3-large
|
||||
name: text-embedding-3-small # or text-embedding-3-large
|
||||
vector_dim: 1536
|
||||
|
||||
qa:
|
||||
|
|
|
|||
Loading…
Reference in a new issue