Allows different models for text-embedding

This commit is contained in:
2024-03-01 13:45:26 +00:00
parent d7f041fa95
commit 1c0aaf57b3
2 changed files with 4 additions and 2 deletions

View File

@@ -185,8 +185,8 @@ impl<T: TokenProvider + Clone> GeminiClient<T> {
pub async fn text_embeddings(
&self,
request: &TextEmbeddingRequest,
model: &str,
) -> Result<TextEmbeddingResponse> {
let model = "models/embedding-001";
let endpoint_url = format!(
"https://{}/v1/projects/{}/locations/{}/publishers/google/models/{}:predict",
self.api_endpoint, self.project_id, self.location_id, model,