use kernelx_core::prelude::*; #[tokio::main] async fn main() -> Result<()> { let provider = OpenAI::builder() .api_base("http://192.168.2.9:30002/v1") .api_key("dummy") .models(models![ "BAAI/bge-small-en-v1.5".to_string() => [Capability::Embed] ]) .build()?; let model = provider.get_model::("BAAI/bge-small-en-v1.5")?; let res = model .embed_data(vec![ "Lorem ipsum dolor sit amet, consectetur adipiscing elit.".to_string(), "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.".to_string(), "Excepteur sint occaecat cupidatat non proident, sunt in culpa.".to_string(), ]) .await?; println!("{:?}, {:?}", res[0], res.len()); // Vectors Ok(()) }