mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
test(interactions): send step and content-list input to the live Gemini API
This commit is contained in:
parent
0aeed16125
commit
432ea8644b
1 changed files with 7 additions and 14 deletions
|
|
@ -55,17 +55,10 @@ class TestGoogleInteractionsCreate:
|
|||
print(f"Usage: {response.usage}")
|
||||
|
||||
def test_create_with_content_list(self, api_key):
|
||||
"""Test creating an interaction with a structured content list (Turn format)."""
|
||||
"""Test creating an interaction with a structured content list (Content[] input)."""
|
||||
response = interactions.create(
|
||||
model="gemini/gemini-2.5-flash",
|
||||
input=[
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{"type": "text", "text": "What is the capital of France?"}
|
||||
],
|
||||
}
|
||||
],
|
||||
input=[{"type": "text", "text": "What is the capital of France?"}],
|
||||
api_key=api_key,
|
||||
)
|
||||
|
||||
|
|
@ -169,25 +162,25 @@ class TestGoogleInteractionsStreaming:
|
|||
|
||||
|
||||
class TestGoogleInteractionsMultiTurn:
|
||||
"""Tests for multi-turn conversations using Turn[] input."""
|
||||
"""Tests for multi-turn conversations using Step[] input."""
|
||||
|
||||
def test_multi_turn_conversation(self, api_key):
|
||||
"""Test a multi-turn conversation per OpenAPI spec (Turn[] format)."""
|
||||
"""Test a multi-turn conversation per OpenAPI spec (Step[] format)."""
|
||||
response = interactions.create(
|
||||
model="gemini/gemini-2.5-flash",
|
||||
input=[
|
||||
{
|
||||
"role": "user",
|
||||
"type": "user_input",
|
||||
"content": [{"type": "text", "text": "My name is Alice."}],
|
||||
},
|
||||
{
|
||||
"role": "model",
|
||||
"type": "model_output",
|
||||
"content": [
|
||||
{"type": "text", "text": "Hello Alice! Nice to meet you."}
|
||||
],
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"type": "user_input",
|
||||
"content": [{"type": "text", "text": "What is my name?"}],
|
||||
},
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue