Generate embeddings for multiple texts
(&self, texts: &[String])
| 797 | |
| 798 | /// Generate embeddings for multiple texts |
| 799 | pub async fn embed_texts(&self, texts: &[String]) -> GraphBitResult<Vec<Vec<f32>>> { |
| 800 | let request = EmbeddingRequest { |
| 801 | input: EmbeddingInput::Multiple(texts.to_vec()), |
| 802 | user: None, |
| 803 | params: HashMap::new(), |
| 804 | }; |
| 805 | |
| 806 | let response = self.provider.generate_embeddings(request).await?; |
| 807 | Ok(response.embeddings) |
| 808 | } |
| 809 | |
| 810 | /// Process a batch of embedding requests with lock-free concurrency control |
| 811 | pub async fn process_batch( |