Separate external provider code snippets

This commit is contained in:
Abdon Pijpelink
2025-11-13 10:51:34 +01:00
parent 2541942c09
commit da0344e457
19 changed files with 130 additions and 146 deletions
@@ -0,0 +1 @@
This code snippet demonstrates how to use the Cohere API for ingest-time inference on Qdrant Cloud. The example upserts a point, but instead of providing an explicit vector, the request includes text along with the name of a Cohere model. When the model name is prepended with `cohere/`, the Qdrant Cloud Inference proxy uses the Cohere API to infer embeddings out of the provided text. Qdrant will store the resulting vector. The request also shows how to pass Cohere-specific parameters to the API. In this case, the request provides the Cohere API key and the `output_dimension` parameter.
@@ -0,0 +1,18 @@
```http
PUT /collections/<your-collection_name>/points?wait=true
{
"points": [
{
"id": 1,
"vector": {
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAFUlEQVR42mNk+M9Qz0AEYBxVSF+FAAhKDveksOjmAAAAAElFTkSuQmCC",
"model": "cohere/embed-v4.0",
"options": {
"cohere-api-key": "<YOUR_COHERE_API_KEY>",
"output_dimension": 512
}
}
}
]
}
```