Skip to content

Commit 4dc91ad

Browse files
committed
docs: remove outdated advanced configuration section for NVIDIA NIM embedding
1 parent 38cd828 commit 4dc91ad

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

src/ai/integrations/embedding-nvidia-nim.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -179,56 +179,3 @@ Create a table with a vector field that uses an NVIDIA NIM model to generate emb
179179
ORDER BY _distance ASC
180180
LIMIT 3;
181181
```
182-
183-
## Advanced Configuration
184-
185-
### Custom API Base URL
186-
187-
If you're using a custom NVIDIA NIM deployment or need to specify a different endpoint, you can configure the API base URL:
188-
189-
=== "Python"
190-
191-
```python
192-
tidb_client.configure_embedding_provider(
193-
provider="nvidia_nim",
194-
api_key="{your-nvidia-api-key}",
195-
api_base="https://your-custom-nim-endpoint.com/v1",
196-
)
197-
```
198-
199-
=== "SQL"
200-
201-
```sql
202-
SET @@GLOBAL.TIDB_EXP_EMBED_NVIDIA_NIM_API_BASE = "https://your-custom-nim-endpoint.com/v1";
203-
```
204-
205-
### Model-Specific Parameters
206-
207-
NVIDIA NIM models support various parameters that can be passed through the embedding function:
208-
209-
=== "Python"
210-
211-
```python
212-
embedding: list[float] = EmbeddingFunction(
213-
model_name="nvidia/nv-embed-v1",
214-
extra_params={
215-
"truncate": "END",
216-
"max_length": 512
217-
}
218-
).VectorField(source_field="content")
219-
```
220-
221-
=== "SQL"
222-
223-
```sql
224-
CREATE TABLE sample_documents (
225-
`id` INT PRIMARY KEY,
226-
`content` TEXT,
227-
`embedding` VECTOR(4096) GENERATED ALWAYS AS (EMBED_TEXT(
228-
"nvidia/nv-embed-v1",
229-
`content`,
230-
'{"truncate": "END", "max_length": 512}'
231-
)) STORED
232-
);
233-
```
234-

0 commit comments

Comments
 (0)