Add Inference concept page

This commit is contained in:
Abdon Pijpelink
2025-10-31 17:15:55 +01:00
parent c0feef8ad5
commit a63bdeddcc
8 changed files with 286 additions and 0 deletions
@@ -0,0 +1,43 @@
```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
}
}
}
```
@@ -0,0 +1,9 @@
```http
PUT /collections/<your-collection_name>
{
"vectors": {
"size": 512,
"distance": "Cosine"
}
}
```
@@ -0,0 +1,16 @@
```http
PUT /collections/<your-collection_name>/points
{
"points": [
{
"id": 1,
"vector": {
"my-bm25-vector": {
"text": "Recipe for baking chocolate chip cookies",
"model": "qdrant/bm25"
}
}
}
]
}
```
@@ -0,0 +1,43 @@
```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
}
}
}
```
@@ -0,0 +1,46 @@
```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
}
}
}
```
@@ -0,0 +1,10 @@
```http
POST /collections/<your-collection_name>/points/query
{
"query": {
"text": "How to bake cookies?",
"model": "qdrant/bm25"
},
"using": "my-bm25-vector"
}
```