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 illustrates how to use the OpenAI API for query-time inference on Qdrant Cloud. Instead of supplying an explicit query vector, the query provides text, along with the name of an OpenAI model. When the model name is prepended with `openai/`, the Qdrant Cloud Inference proxy uses the OpenAI API to infer embeddings out of the provided text. Qdrant will search with the resulting vector. The request also shows how to pass OpenAI-specific parameters to the API. In this case, the request provides the OpenAI API key and the `dimensions` parameter.
@@ -0,0 +1,13 @@
```http
POST /collections/<your-collection_name>/points/query
{
"query": {
"text": "How to bake cookies?",
"model": "openai/text-embedding-3-large",
"options": {
"openai-api-key": "<YOUR_OPENAI_API_KEY>",
"dimensions": 512
}
}
}
```