use std::collections::HashMap; use qdrant_client::{ Payload, Qdrant, qdrant::{Document, NamedVectors, PointStruct, UpsertPointsBuilder, Value}, }; pub async fn main() -> anyhow::Result<()> { let client = Qdrant::from_url("http://localhost:6334").build()?; // @hide client .with_header("openai-api-key", "") .upsert_points( UpsertPointsBuilder::new( "{collection_name}", vec![PointStruct::new( 1, NamedVectors::default() .add_vector( "large", Document { text: "Recipe for baking chocolate chip cookies".into(), model: "openai/text-embedding-3-small".into(), options: HashMap::new(), }, ) .add_vector( "small", Document { text: "Recipe for baking chocolate chip cookies".into(), model: "openai/text-embedding-3-small".into(), options: HashMap::::from_iter(vec![( "mrl".into(), Value::from(64), )]), }, ), Payload::default(), )], ) .wait(true), ) .await?; Ok(()) }