From 48e1903d4684cb5c901e0ecb9c8a06f4ba5d6dff Mon Sep 17 00:00:00 2001 From: chenwanqq Date: Tue, 27 Feb 2024 16:39:12 +0800 Subject: [PATCH] remove test --- src/embedding/endpoint.rs | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/embedding/endpoint.rs b/src/embedding/endpoint.rs index 5420b31..7460e01 100644 --- a/src/embedding/endpoint.rs +++ b/src/embedding/endpoint.rs @@ -81,37 +81,4 @@ impl EmbeddingEndpoint { Ok(EmbeddingResponse::new(response)) } -} - -#[cfg(test)] -mod tests { - use super::super::model::EmbeddingModel; - use super::EmbeddingEndpoint; - use tokio::runtime::Runtime; - #[test] - fn test_embedding() { - let embedding = EmbeddingEndpoint::new(EmbeddingModel::EmbeddingV1).unwrap(); - let input = vec![ - "你好".to_string(), - "你叫什么名字".to_string(), - "你是谁".to_string(), - ]; - let embedding_response = embedding.invoke(input, None).unwrap(); - let embedding_results = embedding_response.get_embedding_results().unwrap(); - println!("{},{}", embedding_results.len(), embedding_results[0].len()); - } - - #[test] - fn test_async_embedding() { - let embedding = EmbeddingEndpoint::new(EmbeddingModel::EmbeddingV1).unwrap(); - let input = vec![ - "你好".to_string(), - "你叫什么名字".to_string(), - "你是谁".to_string(), - ]; - let rt = Runtime::new().unwrap(); - let embedding_response = rt.block_on(embedding.ainvoke(input, None)).unwrap(); - let embedding_results = embedding_response.get_embedding_results().unwrap(); - println!("{},{}", embedding_results.len(), embedding_results[0].len()); - } -} +} \ No newline at end of file