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
13 changes: 13 additions & 0 deletions docs/embeddings/configuration/vectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,19 @@ Builds embeddings using a [llama.cpp](https://github.com/abetlen/llama-cpp-pytho

Builds embeddings using a LiteLLM model. See the [LiteLLM documentation](https://litellm.vercel.app/docs/providers) for the options available with LiteLLM models.

Options for the underlying API call, such as the base URL of an OpenAI-compatible endpoint, are set with [vectors](#vectors).

```yaml
path: openai/text-embedding-3-large
method: litellm
vectors:
api_base: https://api.aimlapi.com/v1
```

The example above runs [aimlapi.com](https://aimlapi.com) embeddings and reads the key from `OPENAI_API_KEY`. Note that the `aiml/` model prefix used by the [LLM](../../../pipeline/llm/llm) pipeline is a chat-completions route only — LiteLLM raises `Unmapped LLM provider for this endpoint` when it's used with embeddings, so the OpenAI-compatible route above is required.

Setting `api_key` in `vectors` also works but isn't recommended. The `vectors` configuration is stored in the index configuration, so [saving](../../methods/#txtai.embeddings.Embeddings.save) an index would write the key to disk in plain text.

### model2vec

Builds embeddings using a [Model2Vec](https://github.com/MinishLab/model2vec) model. Model2Vec is a knowledge-distilled version of a transformers model with static vectors.
Expand Down
3 changes: 3 additions & 0 deletions docs/pipeline/llm/llm.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ The LLM pipeline automatically detects the underlying LLM framework. This can al

See the [LiteLLM documentation](https://litellm.vercel.app/docs/providers) for the options available with LiteLLM models.

Each LLM API reads its key from its own environment variable. For example, [aimlapi.com](https://aimlapi.com) models are prefixed with `aiml/` and read `AIML_API_KEY`.

See the [OpenCode documentation](https://opencode.ai/docs/server/) for more on how to integrate the LLM pipeline with a running OpenCode instance.

```python
Expand Down Expand Up @@ -104,6 +106,7 @@ llm = LLM("ollama/gpt-oss", api_base="http://localhost:11434")
llm = LLM("openai/gpt-oss", api_base="http://localhost:4000")

# LLM APIs - must also set API key via environment variable
llm = LLM("aiml/openai/gpt-5-5")
llm = LLM("gpt-5.2")
llm = LLM("claude-opus-4-5-20251101")
llm = LLM("gemini/gemini-3-pro-preview")
Expand Down