test(interactions): send step and content-list input to the live Gemini API

This commit is contained in:
mateo-berri 2026-08-12 21:47:30 -07:00
parent 0aeed16125
commit 432ea8644b

View file

@ -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?"}],
},
],