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
@@ -6,9 +6,10 @@ use qdrant_client::{
|
||||
};
|
||||
|
||||
pub async fn main() -> anyhow::Result<()> {
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?;
|
||||
let client = Qdrant::from_url("http://localhost:6334").build()?; // @hide
|
||||
|
||||
client
|
||||
.with_header("openai-api-key", "<YOUR_OPENAI_API_KEY>")
|
||||
.upsert_points(
|
||||
UpsertPointsBuilder::new(
|
||||
"{collection_name}",
|
||||
@@ -20,10 +21,7 @@ pub async fn main() -> anyhow::Result<()> {
|
||||
Document {
|
||||
text: "Recipe for baking chocolate chip cookies".into(),
|
||||
model: "openai/text-embedding-3-small".into(),
|
||||
options: HashMap::<String, Value>::from_iter(vec![(
|
||||
"openai-api-key".into(),
|
||||
"<YOUR_OPENAI_API_KEY>".into(),
|
||||
)]),
|
||||
options: HashMap::new(),
|
||||
},
|
||||
)
|
||||
.add_vector(
|
||||
@@ -31,13 +29,10 @@ pub async fn main() -> anyhow::Result<()> {
|
||||
Document {
|
||||
text: "Recipe for baking chocolate chip cookies".into(),
|
||||
model: "openai/text-embedding-3-small".into(),
|
||||
options: HashMap::<String, Value>::from_iter(vec![
|
||||
(
|
||||
"openai-api-key".into(),
|
||||
Value::from("<YOUR_OPENAI_API_KEY>"),
|
||||
),
|
||||
("mrl".into(), Value::from(64)),
|
||||
]),
|
||||
options: HashMap::<String, Value>::from_iter(vec![(
|
||||
"mrl".into(),
|
||||
Value::from(64),
|
||||
)]),
|
||||
},
|
||||
),
|
||||
Payload::default(),
|
||||
|
||||
Reference in New Issue
Block a user