mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-04 10:28:29 +02:00
Separate external provider code snippets
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
This code snippet illustrates how to use the Cohere 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 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 search with 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 `dimensions` parameter.
|
||||
@@ -0,0 +1,13 @@
|
||||
```http
|
||||
POST /collections/<your-collection_name>/points/query
|
||||
{
|
||||
"query": {
|
||||
"text": "a green square",
|
||||
"model": "cohere/embed-v4.0",
|
||||
"options": {
|
||||
"cohere-api-key": "<YOUR_COHERE_API_KEY>",
|
||||
"output_dimension": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
+1
@@ -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.
|
||||
+18
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
-1
@@ -1 +0,0 @@
|
||||
This code snippet demonstrates how to use the Cohere API for inference on Qdrant Cloud. The example first creates a collection that supports vectors with 512 dimensions. Next, a point is inserted, but instead of providing an explicit vector, the example request includes text along with the name of an Cohere model. When the model name is prepended with `cohere/`, the Qdrant Cloud Inference proxy will use the Cohere API to infer embeddings out of the provided text and store the resulting vector. The request also shows how to pass Cohere-specific parameters to the API. In this case, the request passes the Cohere API key and the `dimensions` parameter. Finally, the example shows how to use the Cohere API for query-time inference. Instead of supplying an explicit query vector, the query includes text and name of an Cohere model, as well as an Cohere API key and the Cohere-specific `dimensions` parameter. When the model name is prepended with `cohere/`, the Qdrant Cloud Inference proxy will use the Cohere API to infer embeddings out of the provided text and search with the resulting vector.
|
||||
@@ -1,43 +0,0 @@
|
||||
```http
|
||||
// Create the collection for vectors with 512 dimensions.
|
||||
PUT /collections/<your-collection_name>
|
||||
{
|
||||
"vectors": {
|
||||
"size": 512,
|
||||
"distance": "Cosine"
|
||||
}
|
||||
}
|
||||
|
||||
// Ingest a point. Provide the model name, prepended with "cohere/".
|
||||
// Provide the Cohere API key in the "options" object.
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// Query the data by providing the model name, prepended with "cohere/"
|
||||
// and the Cohere API key.
|
||||
POST /collections/<your-collection_name>/points/query
|
||||
{
|
||||
"query": {
|
||||
"text": "a green square",
|
||||
"model": "cohere/embed-v4.0",
|
||||
"options": {
|
||||
"cohere-api-key": "<YOUR_COHERE_API_KEY>",
|
||||
"output_dimension": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
+1
@@ -0,0 +1 @@
|
||||
This code snippet illustrates how to use the Jina AI 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 Jina AI model. When the model name is prepended with `jinaai/`, the Qdrant Cloud Inference proxy uses the Jina AI API to infer embeddings out of the provided text. Qdrant will search with the resulting vector. The request also shows how to pass Jina AI-specific parameters to the API. In this case, the request provides the Jina AI API key and the `dimensions` parameter.
|
||||
@@ -0,0 +1,13 @@
|
||||
```http
|
||||
POST /collections/<your-collection_name>/points/query
|
||||
{
|
||||
"query": {
|
||||
"text": "Mission to Mars",
|
||||
"model": "jinaai/jina-clip-v2",
|
||||
"options": {
|
||||
"jina-api-key": "<YOUR_JINAAI_API_KEY>",
|
||||
"dimensions": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
+1
@@ -0,0 +1 @@
|
||||
This code snippet illustrates how to use the Jina AI 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 Jina AI model. When the model name is prepended with `jinaai/`, the Qdrant Cloud Inference proxy uses the Jina AI API to infer embeddings out of the provided text. Qdrant will store the resulting vector. The request also shows how to pass Jina AI-specific parameters to the API. In this case, the request provides the Jina AI API key and the `dimensions` parameter.
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
```http
|
||||
PUT /collections/<your-collection_name>/points?wait=true
|
||||
{
|
||||
"points": [
|
||||
{
|
||||
"id": 1,
|
||||
"vector": {
|
||||
"image": "https://qdrant.tech/example.png",
|
||||
"model": "jinaai/jina-clip-v2",
|
||||
"options": {
|
||||
"jina-api-key": "<YOUR_JINAAI_API_KEY>",
|
||||
"dimensions": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
-1
@@ -1 +0,0 @@
|
||||
This code snippet demonstrates how to use the Jina AI API for inference on Qdrant Cloud. The example first creates a collection that supports vectors with 512 dimensions. Next, a point is inserted, but instead of providing an explicit vector, the example request includes text along with the name of an Jina AI model. When the model name is prepended with `jinaai/`, the Qdrant Cloud Inference proxy will use the Jina AI API to infer embeddings out of the provided text and store the resulting vector. The request also shows how to pass Jina AI-specific parameters to the API. In this case, the request passes the Jina AI API key and the `dimensions` parameter. Finally, the example shows how to use the Jina AI API for query-time inference. Instead of supplying an explicit query vector, the query includes text and name of an Jina AI model, as well as an Jina AI API key and the Jina AI-specific `dimensions` parameter. When the model name is prepended with `jinaai/`, the Qdrant Cloud Inference proxy will use the Jina AI API to infer embeddings out of the provided text and search with the resulting vector.
|
||||
@@ -1,43 +0,0 @@
|
||||
```http
|
||||
// Create the collection for vectors with 512 dimensions.
|
||||
PUT /collections/<your-collection_name>
|
||||
{
|
||||
"vectors": {
|
||||
"size": 512,
|
||||
"distance": "Cosine"
|
||||
}
|
||||
}
|
||||
|
||||
// Ingest a point. Provide the model name, prepended with "jinaai/".
|
||||
// Provide the Jina AI API key in the "options" object.
|
||||
PUT /collections/<your-collection_name>/points?wait=true
|
||||
{
|
||||
"points": [
|
||||
{
|
||||
"id": 1,
|
||||
"vector": {
|
||||
"image": "https://qdrant.tech/example.png",
|
||||
"model": "jinaai/jina-clip-v2",
|
||||
"options": {
|
||||
"jina-api-key": "<YOUR_JINAAI_API_KEY>",
|
||||
"dimensions": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// Query the data by providing the model name, prepended with "jinaai/"
|
||||
// and the Jina AI API key.
|
||||
POST /collections/<your-collection_name>/points/query
|
||||
{
|
||||
"query": {
|
||||
"text": "Mission to Mars",
|
||||
"model": "jinaai/jina-clip-v2",
|
||||
"options": {
|
||||
"jina-api-key": "<YOUR_JINAAI_API_KEY>",
|
||||
"dimensions": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
+1
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
+1
@@ -0,0 +1 @@
|
||||
This code snippet illustrates how to use the OpenAI 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 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 store 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.
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
```http
|
||||
PUT /collections/<your-collection_name>/points?wait=true
|
||||
{
|
||||
"points": [
|
||||
{
|
||||
"id": 1,
|
||||
"vector": {
|
||||
"text": "Recipe for baking chocolate chip cookies",
|
||||
"model": "openai/text-embedding-3-large",
|
||||
"options": {
|
||||
"openai-api-key": "<YOUR_OPENAI_API_KEY>",
|
||||
"dimensions": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
-1
@@ -1 +0,0 @@
|
||||
This code snippet demonstrates how to use the OpenAI API for inference on Qdrant Cloud. The example first creates a collection that supports vectors with 512 dimensions. Next, a point is inserted, but instead of providing an explicit vector, the example request includes text along with the name of an OpenAI model. When the model name is prepended with `openai/`, the Qdrant Cloud Inference proxy will use the OpenAI API to infer embeddings out of the provided text and store the resulting vector. The request also shows how to pass OpenAI-specific parameters to the API. In this case, the request passes the OpenAI API key and the `dimensions` parameter. Finally, the example shows how to use the OpenAI API for query-time inference. Instead of supplying an explicit query vector, the query includes text and name of an OpenAI model, as well as an OpenAI API key and the OpenAI-specific `dimensions` parameter. When the model name is prepended with `openai/`, the Qdrant Cloud Inference proxy will use the OpenAI API to infer embeddings out of the provided text and search with the resulting vector.
|
||||
@@ -1,46 +0,0 @@
|
||||
```http
|
||||
// Configure the collection for vectors with 512 dimensions.
|
||||
PUT /collections/<your-collection_name>
|
||||
{
|
||||
"vectors": {
|
||||
"size": 512,
|
||||
"distance": "Cosine"
|
||||
}
|
||||
}
|
||||
|
||||
// Ingest a point. Provide the model name, prepended with "openai/".
|
||||
// Provide the OpenAI API key in the "options" object.
|
||||
PUT /collections/<your-collection_name>/points?wait=true
|
||||
{
|
||||
"points": [
|
||||
{
|
||||
"id": 1,
|
||||
"vector": {
|
||||
"text": "Recipe for baking chocolate chip cookies",
|
||||
"model": "openai/text-embedding-3-large",
|
||||
"options": {
|
||||
"openai-api-key": "<YOUR_OPENAI_API_KEY>",
|
||||
"dimensions": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
// Retrieve the point to see the generated embeddings
|
||||
GET /collections/<your-collection_name>/points/1
|
||||
|
||||
// Query the data by providing the model name, prepended with "openai/"
|
||||
// and the OpenAI API key.
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user