Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Merged
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
17 changes: 8 additions & 9 deletions src/content/docs/extensions/llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ To allow API calls to the providers, you must set the appropriate environment va
| `google-gemini` | `GOOGLE_GEMINI_API_KEY` |
| `open-ai` | `OPENAI_API_KEY` |
| `voyage-ai` | `VOYAGE_API_KEY` |
| `ollama` | None, but expects access to `http://localhost:11434` |
| `ollama` | None |

See how to set environment variables below:

Expand Down Expand Up @@ -77,29 +77,28 @@ CALL CREATE_EMBEDDING(
| Option |Type| Description |
|--------|------|-------|
| dimensions |`INT64`| The size of the embedding vector, if supported by the provider. Currently only `'open-ai'`, `'google-vertex'`, and `'voyage-ai'` support this option. |
| region |`STRING`| A region or endpoint, if supported by the provider. E.g., `'us-east-1'` for `'amazon-bedrock'`. |
| region |`STRING`| The region to send requests to, if supported by the provider. E.g., `'us-east-1'` for `'amazon-bedrock'`. |
| endpoint |`STRING`| The endpoint to send requests to. Only applies to Ollama. Default is `http://localhost:11434` |

:::note[Note]
If an unsupported model, dimension, or region is specified, the API call to the provider will fail. Check the provider's API documentation for the currently supported options.
If an unsupported model, dimension, region, or endpoint is specified, the API call to the provider will fail. Check the provider's API documentation for the currently supported options.
:::

### Examples

```sql
CALL CREATE_EMBEDDING("Hello world", "open-ai", "text-embedding-3-small");

CALL CREATE_EMBEDDING("Hello world", "ollama", "nomic-embed-text");

CALL CREATE_EMBEDDING("Hello world", "google-gemini", "gemini-embedding-exp-03-07");
```

With optional parameters:
CALL CREATE_EMBEDDING("Hello world", "ollama", "nomic-embed-text");

```sql
CALL CREATE_EMBEDDING("Hello world", "voyage-ai", "voyage-3-large", 512);
CALL CREATE_EMBEDDING("Hello world", "ollama", "nomic-embed-text", "http://endpoint.example.com:8000");

CALL CREATE_EMBEDDING("Hello world", "amazon-bedrock", "amazon.titan-embed-text-v1", "us-east-1");

CALL CREATE_EMBEDDING("Hello world", "voyage-ai", "voyage-3-large", 512);

CALL CREATE_EMBEDDING("Hello world", "google-vertex", "gemini-embedding-001", 256, "us-east1");
```
---
Expand Down