mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-06 19:38:30 +02:00
+21
@@ -0,0 +1,21 @@
|
||||
```csharp
|
||||
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.QueryAsync(
|
||||
collectionName: "{collection_name}",
|
||||
query: new Document()
|
||||
{
|
||||
Model = "openai/text-embedding-3-large",
|
||||
Text = "How to bake cookies?",
|
||||
Options = { ["openai-api-key"] = "<YOUR_OPENAI_API_KEY>", ["dimensions"] = 512 },
|
||||
}
|
||||
);
|
||||
```
|
||||
@@ -14,7 +14,7 @@ client, err := qdrant.NewClient(&qdrant.Config{
|
||||
})
|
||||
|
||||
client.Query(ctx, &qdrant.QueryPoints{
|
||||
CollectionName: "<your-collection>",
|
||||
CollectionName: "{collection_name}",
|
||||
Query: qdrant.NewQueryNearest(
|
||||
qdrant.NewVectorInputDocument(&qdrant.Document{
|
||||
Model: "openai/text-embedding-3-large",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
```http
|
||||
POST /collections/<your-collection_name>/points/query
|
||||
POST /collections/{collection_name}/points/query
|
||||
{
|
||||
"query": {
|
||||
"text": "How to bake cookies?",
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ client = QdrantClient(
|
||||
)
|
||||
|
||||
client.query_points(
|
||||
collection_name="<your_collection_name>",
|
||||
collection_name="{collection_name}",
|
||||
query=models.Document(
|
||||
text="How to bake cookies?",
|
||||
model="openai/text-embedding-3-large",
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ options.insert("dimensions".to_string(), 512.into());
|
||||
|
||||
client
|
||||
.query(
|
||||
QueryPointsBuilder::new("<your-collection_name>")
|
||||
QueryPointsBuilder::new("{collection_name}")
|
||||
.query(Query::new_nearest(Document {
|
||||
text: "How to bake cookies?".into(),
|
||||
model: "openai/text-embedding-3-large".into(),
|
||||
|
||||
Reference in New Issue
Block a user