forked from phoenix/litellm-mirror
e2e testing for /gemini pass through
This commit is contained in:
parent
d8e5134935
commit
d047a9b2c9
1 changed files with 15 additions and 0 deletions
15
tests/pass_through_tests/test_google_ai_passthrough.py
Normal file
15
tests/pass_through_tests/test_google_ai_passthrough.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
import google.generativeai as genai
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
genai.configure(
|
||||||
|
api_key="sk-1234",
|
||||||
|
client_options={"api_endpoint": "http://0.0.0.0:4000/gemini"},
|
||||||
|
transport="rest",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_basic_non_streaming():
|
||||||
|
model = genai.GenerativeModel("gemini-1.5-flash")
|
||||||
|
response = model.generate_content("Explain how AI works")
|
||||||
|
print("response", response)
|
||||||
|
assert response.text is not None
|
Loading…
Add table
Add a link
Reference in a new issue