mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-09 21:08:31 +02:00
Restructure inference docs (#2225)
* Break Inference page into several pages * Make all inference code snippets testable and clean up * Make more snippets testable * Edits * Document automatic query and passage prefix injection in Cloud Inference Qdrant Cloud Inference silently applies model-specific prefixes (e.g. "query: "/"passage: " for E5, BGE-style instruction prefix for BGE/mxbai/ Snowflake arctic-embed) so users don't need to manage them manually. Add a section explaining this behavior, the idempotency guarantee, and the scope (Qdrant-hosted models only; external providers handle their own). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Document short query optimization in Cloud Inference Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Update links * Expand on external provider API key usage * Add section about external provider API keys * Default to header for external API keys --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
90d072eb03
commit
478b96554f
@@ -5,8 +5,10 @@ public class Snippet
|
||||
{
|
||||
public static async Task Run()
|
||||
{
|
||||
// @hide-start
|
||||
var client = new QdrantClient(
|
||||
host: "xyz-example.qdrant.io", port: 6334, https: true, apiKey: "<your-api-key>");
|
||||
// @hide-end
|
||||
|
||||
await client.UpsertAsync(
|
||||
collectionName: "{collection_name}",
|
||||
|
||||
-3
@@ -2,9 +2,6 @@
|
||||
using Qdrant.Client;
|
||||
using Qdrant.Client.Grpc;
|
||||
|
||||
var client = new QdrantClient(
|
||||
host: "xyz-example.qdrant.io", port: 6334, https: true, apiKey: "<your-api-key>");
|
||||
|
||||
await client.UpsertAsync(
|
||||
collectionName: "{collection_name}",
|
||||
points: new List<PointStruct>
|
||||
|
||||
-7
@@ -5,13 +5,6 @@ import (
|
||||
"github.com/qdrant/go-client/qdrant"
|
||||
)
|
||||
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "xyz-example.qdrant.io",
|
||||
Port: 6334,
|
||||
APIKey: "<paste-your-api-key-here>",
|
||||
UseTLS: true,
|
||||
})
|
||||
|
||||
client.Upsert(context.Background(), &qdrant.UpsertPoints{
|
||||
CollectionName: "{collection_name}",
|
||||
Points: []*qdrant.PointStruct{
|
||||
|
||||
+17
-23
@@ -12,27 +12,21 @@ import io.qdrant.client.grpc.Points.PointStruct;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
QdrantClient client =
|
||||
new QdrantClient(
|
||||
QdrantGrpcClient.newBuilder("xyz-example.qdrant.io", 6334, true)
|
||||
.withApiKey("<your-api-key")
|
||||
.build());
|
||||
|
||||
client
|
||||
.upsertAsync(
|
||||
"{collection_name}",
|
||||
List.of(
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(1))
|
||||
.setVectors(
|
||||
namedVectors(
|
||||
Map.of(
|
||||
"my-bm25-vector",
|
||||
vector(
|
||||
Document.newBuilder()
|
||||
.setModel("qdrant/bm25")
|
||||
.setText("Recipe for baking chocolate chip cookies")
|
||||
.build()))))
|
||||
.build()))
|
||||
.get();
|
||||
client
|
||||
.upsertAsync(
|
||||
"{collection_name}",
|
||||
List.of(
|
||||
PointStruct.newBuilder()
|
||||
.setId(id(1))
|
||||
.setVectors(
|
||||
namedVectors(
|
||||
Map.of(
|
||||
"my-bm25-vector",
|
||||
vector(
|
||||
Document.newBuilder()
|
||||
.setModel("qdrant/bm25")
|
||||
.setText("Recipe for baking chocolate chip cookies")
|
||||
.build()))))
|
||||
.build()))
|
||||
.get();
|
||||
```
|
||||
|
||||
-6
@@ -1,12 +1,6 @@
|
||||
```python
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(
|
||||
url="https://xyz-example.qdrant.io:6333",
|
||||
api_key="<your-api-key>",
|
||||
cloud_inference=True
|
||||
)
|
||||
|
||||
client.upsert(
|
||||
collection_name="{collection_name}",
|
||||
points=[
|
||||
|
||||
-2
@@ -5,8 +5,6 @@ use qdrant_client::{
|
||||
};
|
||||
use std::collections::HashMap;
|
||||
|
||||
let client = Qdrant::from_url("<your-qdrant-url>").build()?;
|
||||
|
||||
client
|
||||
.upsert_points(UpsertPointsBuilder::new(
|
||||
"{collection_name}",
|
||||
|
||||
-2
@@ -1,8 +1,6 @@
|
||||
```typescript
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
|
||||
client.upsert("{collection_name}", {
|
||||
points: [
|
||||
{
|
||||
|
||||
@@ -7,12 +7,14 @@ import (
|
||||
)
|
||||
|
||||
func Main() {
|
||||
// @hide-start
|
||||
client, err := qdrant.NewClient(&qdrant.Config{
|
||||
Host: "xyz-example.qdrant.io",
|
||||
Port: 6334,
|
||||
APIKey: "<paste-your-api-key-here>",
|
||||
UseTLS: true,
|
||||
})
|
||||
// @hide-end
|
||||
|
||||
if err != nil { panic(err) } // @hide
|
||||
|
||||
|
||||
@@ -15,11 +15,13 @@ import java.util.Map;
|
||||
|
||||
public class Snippet {
|
||||
public static void run() throws Exception {
|
||||
// @hide-start
|
||||
QdrantClient client =
|
||||
new QdrantClient(
|
||||
QdrantGrpcClient.newBuilder("xyz-example.qdrant.io", 6334, true)
|
||||
.withApiKey("<your-api-key")
|
||||
.build());
|
||||
// @hide-end
|
||||
|
||||
client
|
||||
.upsertAsync(
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
# @hide-start
|
||||
client = QdrantClient(
|
||||
url="https://xyz-example.qdrant.io:6333",
|
||||
api_key="<your-api-key>",
|
||||
api_key="<your-qdrant-api-key>",
|
||||
cloud_inference=True
|
||||
)
|
||||
# @hide-end
|
||||
|
||||
client.upsert(
|
||||
collection_name="{collection_name}",
|
||||
|
||||
@@ -5,7 +5,7 @@ use qdrant_client::{
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("<your-qdrant-url>").build()?;
|
||||
let client = Qdrant::from_url("<your-qdrant-url>").build()?; // @hide
|
||||
|
||||
client
|
||||
.upsert_points(UpsertPointsBuilder::new(
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { QdrantClient } from "@qdrant/js-client-rest";
|
||||
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 });
|
||||
const client = new QdrantClient({ host: "localhost", port: 6333 }); // @hide
|
||||
|
||||
client.upsert("{collection_name}", {
|
||||
points: [
|
||||
|
||||
Reference in New Issue
Block a user