fix(embeddings_handler.py): initial working commit for google ai studio text embeddings /embedContent endpoint

This commit is contained in:
Krrish Dholakia 2024-08-27 18:14:56 -07:00
parent 77e6da78a1
commit 5b29ddd2a6
6 changed files with 111 additions and 48 deletions

View file

@ -697,7 +697,8 @@ async def test_gemini_embeddings():
print(f"response: {response}")
# stubbed endpoint is setup to return this
assert response.data[0]["embedding"] == [0.1, 0.2]
assert isinstance(response.data[0]["embedding"], list)
assert response.usage.prompt_tokens > 0
except Exception as e:
pytest.fail(f"Error occurred: {e}")