Add OpenRouter to inference docs

This commit is contained in:
Abdon Pijpelink
2026-01-22 10:35:34 +01:00
parent ab0cc9955a
commit 21acac2f8d
29 changed files with 665 additions and 1 deletions
@@ -0,0 +1,31 @@
package snippet
import (
"context"
"github.com/qdrant/go-client/qdrant"
)
func Main() {
client, err := qdrant.NewClient(&qdrant.Config{
Host: "xyz-example.qdrant.io",
Port: 6334,
APIKey: "<paste-your-openrouter-key-here>",
UseTLS: true,
})
if err != nil { panic(err) } // @hide
client.Query(context.Background(), &qdrant.QueryPoints{
CollectionName: "{collection_name}",
Query: qdrant.NewQueryNearest(
qdrant.NewVectorInputDocument(&qdrant.Document{
Model: "openrouter/mistralai/mistral-embed-2312",
Text: "How to bake cookies?",
Options: qdrant.NewValueMap(map[string]any{
"openrouter-api-key": "<YOUR_OPENROUTER_API_KEY>",
}),
}),
),
})
}