v1beta Interactions API, API şeklini yeniden yapılandırarak yayın sırasında yönlendirme ve eşzamansız araç çağrıları gibi gelecekteki özellikleri destekleyen, API'yi bozan değişiklikler sunuyor. Bu sayfada, nelerin değiştiği açıklanmakta ve geçiş yapmanıza yardımcı olacak öncesi ve sonrası kod örnekleri verilmektedir. İki tür değişiklik vardır:
- Adımlar şeması:
outputsdizisinin yerini yeni birstepsdizisi alarak her etkileşim dönüşünün yapılandırılmış bir zaman çizelgesini sunar. - Çıkış biçimi yapılandırması:
Yeni bir polimorfik
response_format, tüm çıkış biçimi kontrollerini birleştirir veresponse_mime_typeöğesini kaldırır.
Entegrasyonunuzu güncellemek için Yeni şemaya geçiş başlıklı makaledeki adımları uygulayın.
Temel değişiklik: outputs - steps
Yeni şema, outputs dizisini steps dizisiyle değiştirir.
- Eski: Yanıtlarda yalnızca modelin oluşturduğu içeriği içeren düz bir
outputsdizisi döndürülüyordu. - Yeni şema: Yanıtlar, tür ayırt edicileri içeren yapılandırılmış adımlardan oluşan bir
stepsdizisi döndürür.
POST /interactions yalnızca çıkış adımlarını döndürür. GET /interactions/{id}
ilk user_input adımı da dahil olmak üzere tam adım zaman çizelgesini döndürür.
Temel giriş/çıkış (tekli)
Önce (eski)
Python
# Request
interaction = client.interactions.create(
model="gemini-3.8-flash", input="Tell me a joke."
)
# Response access
print(interaction.outputs[-1].text)
JavaScript
// Request
const interaction = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Tell me a joke.'
});
// Response access
console.log(interaction.outputs[-1].text);
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash",
"input": "Tell me a joke."
}'
// Response
{
"id": "int_123",
"role": "model",
"outputs": [
{
"type": "text",
"text": "Why did the chicken cross the road?"
}
]
}
Sonra (yeni şema)
Python
# Request
interaction = client.interactions.create(
model="gemini-3.8-flash", input="Tell me a joke."
)
# Response access (Recommended sugar)
print(interaction.output_text)
JavaScript
// Request
const interaction = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Tell me a joke.'
});
// Response access (Recommended sugar)
console.log(interaction.output_text);
[sdk-convenience]: /gemini-api/docs/interactions-overview#sdk-sugar
REST
# Opt-in needed before May 26th
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-H "Api-Revision: 2026-05-20" \
-d '{
"model": "gemini-3.8-flash",
"input": "Tell me a joke."
}'
// POST Response
{
"id": "int_123",
"steps": [
{
"type": "model_output",
"content": [
{
"type": "text",
"text": "Why did the chicken cross the road?"
}
]
}
]
}
// GET /v1beta/interactions/int_123 (returns full timeline including input)
{
"id": "int_123",
"steps": [
{
"type": "user_input",
"content": [
{ "type": "text", "text": "Tell me a joke." }
]
},
{
"type": "model_output",
"content": [
{
"type": "text",
"text": "Why did the chicken cross the road?"
}
]
}
]
}
İşlev çağırma
İstek yapısı değişmez ancak yanıtta düz outputs içeriği yapılandırılmış adımlarla değiştirilir.
Önce (eski)
Python
# Accessing function call in legacy schema
for output in interaction.outputs:
if output.type == "function_call":
print(f"Calling {output.name} with {output.arguments}")
JavaScript
// Accessing function call in legacy schema
for (const output of interaction.outputs) {
if (output.type === 'function_call') {
console.log(`Calling ${output.name} with ${JSON.stringify(output.arguments)}`);
}
}
REST
// Response
{
"id": "int_001",
"role": "model",
"status": "requires_action",
"outputs": [
{
"type": "thought",
"signature": "abc123..."
},
{
"type": "function_call",
"id": "fc_1",
"name": "get_weather",
"arguments": { "location": "Boston, MA" }
}
]
}
Sonra (yeni şema)
Python
# Accessing function call in new steps schema
for step in interaction.steps:
if step.type == "function_call":
print(f"Calling {step.name} with {step.arguments}")
JavaScript
// Accessing function call in new steps schema
for (const step of interaction.steps) {
if (step.type === 'function_call') {
console.log(`Calling ${step.name} with ${JSON.stringify(step.arguments)}`);
}
}
REST
// POST Response
{
"id": "int_001",
"status": "requires_action",
"steps": [
{
"type": "thought",
"summary": [{
"type": "text",
"text": "I need to check the weather in Boston..."
}],
"signature": "abc123..."
},
{
"type": "function_call",
"id": "fc_1",
"name": "get_weather",
"arguments": { "location": "Boston, MA" }
}
]
}
Sunucu tarafı araçlar
Sunucu tarafı araçlar (ör. Google Arama veya kod yürütme) artık steps dizisinde belirli adım türleri döndürüyor. Eski şema bu işlemleri outputs dizisindeki belirli içerik türleri olarak döndürürken yeni şema bunları steps dizisine taşır. Aşağıdaki örneklerde Google Arama kullanılmaktadır.
Önce (eski)
Python
# Accessing search results in legacy schema
for output in interaction.outputs:
if output.type == "google_search_call":
print(f"Searched for: {output.arguments.queries}")
elif output.type == "google_search_result":
print(f"Found results: {output.result.rendered_content}")
JavaScript
// Accessing search results in legacy schema
for (const output of interaction.outputs) {
if (output.type === 'google_search_call') {
console.log(`Searched for: ${output.arguments.queries}`);
} else if (output.type === 'google_search_result') {
console.log(`Found results: ${output.result.renderedContent}`);
}
}
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash",
"input": "Who won the last Super Bowl?",
"tools": [
{ "type": "google_search" }
]
}'
// Response
{
"id": "int_456",
"outputs": [
{
"type": "google_search_call",
"id": "gs_1",
"arguments": { "queries": ["last Super Bowl winner"] }
},
{
"type": "google_search_result",
"call_id": "gs_1",
"result": {
"rendered_content": "<div>...</div>",
"url": "https://www.nfl.com/super-bowl"
}
},
{
"type": "text",
"text": "The Kansas City Chiefs won the last Super Bowl.",
"annotations": [
{
"start_index": 4,
"end_index": 22,
"source": "https://www.nfl.com/super-bowl"
}
]
}
],
"status": "completed"
}
Sonra (yeni şema)
Python
# Accessing search results in new steps schema
for step in interaction.steps:
if step.type == "google_search_call":
print(f"Searched for: {step.arguments.queries}")
elif step.type == "google_search_result":
print(f"Found results: {step.result[0].search_suggestions}")
JavaScript
// Accessing search results in new steps schema
for (const step of interaction.steps) {
if (step.type === 'google_search_call') {
console.log(`Searched for: ${step.arguments.queries}`);
} else if (step.type === 'google_search_result') {
console.log(`Found results: ${step.result[0].search_suggestions}`);
}
}
REST
# Opt-in needed before May 26th
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-H "Api-Revision: 2026-05-20" \
-d '{
"model": "gemini-3.8-flash",
"input": "Who won the last Super Bowl?",
"tools": [
{ "type": "google_search" }
]
}'
// POST Response
{
"id": "int_456",
"steps": [
{
"type": "google_search_call",
"id": "gs_1",
"arguments": { "queries": ["last Super Bowl winner"] },
"signature": "abc123..."
},
{
"type": "google_search_result",
"call_id": "gs_1",
"result": {
"search_suggestions": "<div>...</div>"
},
"signature": "abc123..."
},
{
"type": "model_output",
"content": [
{
"type": "text",
"text": "The Kansas City Chiefs won the last Super Bowl.",
"annotations": [
{
"type": "url_citation",
"url": "https://www.nfl.com/super-bowl",
"title": "NFL.com",
"start_index": 4,
"end_index": 22
}
]
}
]
}
],
"status": "completed"
}
Canlı Yayın
Yayın, yeni etkinlik türlerini ortaya çıkarır:
Yeni etkinlik türleri
interaction.createdinteraction.completedinteraction.in_progressinteraction.requires_actionstep.startstep.deltastep.stop
Desteği sonlandırılmış etkinlik türleri
Aşağıdaki eski etkinlik türleri, yukarıda listelenen yeni etkinliklerle değiştirilir:
interaction.start→interaction.createdcontent.start→step.startcontent.delta→step.deltacontent.stop→step.stopinteraction.complete→interaction.completedinteraction.status_update→interaction.in_progress,interaction.requires_actionvb. ile değiştirildi.
Akış işlev çağrıları: İşlev çağrısıyla akış kullandığınızda step.start etkinliği, işlev adını yayınlar ve step.delta etkinlikleri, bağımsız değişkenleri kısmi JSON dizeleri olarak (arguments_delta kullanarak) yayınlar. Bağımsız değişkenlerin tamamını almak için bu deltaları biriktirmeniz gerekir. Bu, işlev çağrısı nesnesinin tamamını tek seferde aldığınız tekli çağrılardan farklıdır.
Örnekler
Önce (Eski)
Python
# Legacy streaming used content.delta
stream = client.interactions.create(
model="gemini-3.8-flash",
input="Explain quantum entanglement in simple terms.",
stream=True,
)
for chunk in stream:
if chunk.event_type == "content.delta":
if chunk.delta.type == "text":
print(chunk.delta.text, end="", flush=True)
JavaScript
// Legacy streaming used content.delta
const stream = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Explain quantum entanglement in simple terms.',
stream: true,
});
for await (const chunk of stream) {
if (chunk.event_type === 'content.delta') {
if (chunk.delta.type === 'text') {
process.stdout.write(chunk.delta.text);
}
}
}
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash",
"input": "Explain quantum entanglement in simple terms.",
"stream": true
}'
// Response (SSE Lines)
// event: interaction.start
// data: {"id": "int_123", "status": "in_progress"}
//
// event: content.start
// data: {"index": 0, "type": "text"}
//
// event: content.delta
// data: {"delta": {"type": "text", "text": "Quantum entanglement is..."}}
//
// event: content.stop
// data: {"index": 0}
//
// event: interaction.complete
// data: {"id": "int_123", "status": "done", "usage": {"total_tokens": 42}}
Sonra (Yeni Şema)
Python
# Consuming stream and handling new event types
for event in client.interactions.create(
model="gemini-3.8-flash",
input="Tell me a story.",
stream=True,
):
if event.event_type == "step.delta": # CHANGED: step.delta instead of content.delta
if event.delta.type == "text":
print(event.delta.text, end="")
JavaScript
// Consuming stream and handling new event types
const stream = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Tell me a story.',
stream: true,
});
for await (const event of stream) {
if (event.event_type === 'step.delta') { // CHANGED: step.delta instead of content.delta
if (event.delta.type === 'text') {
process.stdout.write(event.delta.text);
}
}
}
REST
# Opt-in needed before May 26th
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream" \
-H "Api-Revision: 2026-05-20" \
-d '{
"model": "gemini-3.8-flash",
"input": "Tell me a story.",
"stream": true
}'
// Response (SSE Lines)
// event: interaction.created
// data: {"interaction": {"id": "int_xyz", "status": "in_progress", "object": "interaction", "model": "gemini-3.8-flash"}, "event_type": "interaction.created"}
//
// event: interaction.in_progress
// data: {"interaction_id": "int_xyz", "event_type": "interaction.in_progress"}
//
// event: step.start
// data: {"index": 0, "step": {"type": "thought", "signature": "abc123..."}, "event_type": "step.start"}
//
// event: step.stop
// data: {"index": 0, "event_type": "step.stop"}
//
// event: step.start
// data: {"index": 1, "step": {"content": [{"text": "Once upon", "type": "text"}], "type": "model_output"}, "event_type": "step.start"}
//
// event: step.delta
// data: {"index": 1, "delta": {"text": " a time...", "type": "text"}, "event_type": "step.delta"}
//
// event: step.stop
// data: {"type": "step.stop", "index": 1, "status": "done"}
//
// event: interaction.completed
// data: {"type": "interaction.completed", "interaction": {"id": "int_xyz", "status": "completed", "usage": {"prompt_tokens": 10, "completion_tokens": 5, "total_tokens": 15}}} // NEW: Dedicated completion event
Durumsuz Sohbet Geçmişi
Görüşme geçmişini istemci tarafında manuel olarak yönetiyorsanız (durum bilgisiz kullanım alanı) önceki sıraları nasıl birleştirdiğinizi güncellemeniz gerekir.
- Eski: Geliştiriciler genellikle yanıtlardan
outputsdizisini toplar ve bir sonraki dönüşteinputalanında geri gönderirdi. - Yeni şema: Artık yanıttan
stepsdizisini alıp bir sonraki isteğininputalanına iletmeniz ve yeni kullanıcı sıranızıuser_inputadımı olarak eklemeniz gerekir.
Çıkış biçimi yapılandırması: response_format değişiklik
Güncellenen API, tüm çıkış biçimi kontrollerini birleştirilmiş, polimorfik bir response_format alanında birleştirir. Bu sayede çıkış yapılandırması üst düzeyde merkezileştirilir ve generation_config, model davranışına (ör. sıcaklık, top_p ve düşünme) odaklanır.
Önemli değişiklikler
- API,
response_mime_typeöğesini kaldırır. Artıkresponse_formatiçinde biçim girişi başına MIME türünü belirtmeniz gerekir. response_formatartık polimorfik bir nesne (veya dizi). Her girişin birtypeayrıştırıcısı (text,audio,image) ve türe özgü alanları vardır. Birden fazla çıktı modu istemek için bir biçim girişleri dizisi iletin.image_config,generation_configkonumundanresponse_formatkonumuna taşınır. Artıkaspect_ratioveimage_sizegibi resim çıkış ayarlarını"type": "image"ileresponse_formatgirişinde belirtiyorsunuz.
Yapılandırılmış çıkış (JSON)
Yeni şemada response_mime_type alanı kaldırıldı. Bunun yerine, response_format nesnesinde MIME türünü ve JSON şemasını "type": "text" ile birlikte belirtin.
Önce (eski)
Python
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Summarize this article.",
response_mime_type="application/json",
response_format={
"type": "object",
"properties": {
"summary": {"type": "string"}
}
},
)
print(interaction.outputs[-1].text)
JavaScript
const interaction = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Summarize this article.',
response_mime_type: 'application/json',
response_format: {
type: 'object',
properties: {
summary: { type: 'string' }
}
},
});
console.log(interaction.outputs[-1].text);
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash",
"input": "Summarize this article.",
"response_mime_type": "application/json",
"response_format": {
"type": "object",
"properties": {
"summary": { "type": "string" }
}
}
}'
Sonra (yeni şema)
Python
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Summarize this article.",
# response_mime_type is removed — specify mime_type inside response_format
response_format={
"type": "text",
"mime_type": "application/json",
"schema": {
"type": "object",
"properties": {
"summary": {"type": "string"}
}
}
},
)
# Print response
print(interaction.output_text)
JavaScript
const interaction = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Summarize this article.',
// response_mime_type is removed — specify mime_type inside response_format
response_format: {
type: 'text',
mime_type: 'application/json',
schema: {
type: 'object',
properties: {
summary: { type: 'string' }
}
}
},
});
// Print response
console.log(interaction.output_text);
REST
# Opt-in needed before May 26th
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-H "Api-Revision: 2026-05-20" \
-d '{
"model": "gemini-3.8-flash",
"input": "Summarize this article.",
"response_format": {
"type": "text",
"mime_type": "application/json",
"schema": {
"type": "object",
"properties": {
"summary": { "type": "string" }
}
}
}
}'
Resim yapılandırması
Yeni şema, image_config öğesini generation_config öğesinden kaldırır. Artık görüntü çıkışı ayarlarını "type": "image" ile response_format girişinde belirtiyorsunuz.
Önce (eski)
Python
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Generate an image of a sunset over the ocean.",
generation_config={
"image_config": {
"aspect_ratio": "1:1",
"image_size": "1K"
}
},
)
JavaScript
const interaction = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Generate an image of a sunset over the ocean.',
generation_config: {
image_config: {
aspect_ratio: '1:1',
image_size: '1K'
}
},
});
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.8-flash",
"input": "Generate an image of a sunset over the ocean.",
"generation_config": {
"image_config": {
"aspect_ratio": "1:1",
"image_size": "1K"
}
}
}'
Sonra (yeni şema)
Python
interaction = client.interactions.create(
model="gemini-3.8-flash",
input="Generate an image of a sunset over the ocean.",
# image_config is removed from generation_config — use response_format
response_format={
"type": "image",
"mime_type": "image/jpeg",
"aspect_ratio": "1:1",
"image_size": "1K"
},
)
JavaScript
const interaction = await client.interactions.create({
model: 'gemini-3.8-flash',
input: 'Generate an image of a sunset over the ocean.',
// image_config is removed from generation_config — use response_format
response_format: {
type: 'image',
mime_type: 'image/jpeg',
aspect_ratio: '1:1',
image_size: '1K'
},
});
REST
# Opt-in needed before May 26th
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-H "Api-Revision: 2026-05-20" \
-d '{
"model": "gemini-3.8-flash",
"input": "Generate an image of a sunset over the ocean.",
"response_format": {
"type": "image",
"mime_type": "image/jpeg",
"aspect_ratio": "1:1",
"image_size": "1K"
}
}'
Ses yapılandırması
Yeni şema, response_modalities: ["audio"] yerine "type": "audio" response_format girişi kullanır.
Önce (eski)
Python
interaction = client.interactions.create(
model="gemini-3.1-flash-tts-preview",
input="Say cheerfully: Have a wonderful day!",
response_modalities=["audio"],
generation_config={
"speech_config": [
{"voice": "Kore"}
]
}
)
JavaScript
const interaction = await client.interactions.create({
model: 'gemini-3.1-flash-tts-preview',
input: 'Say cheerfully: Have a wonderful day!',
response_modalities: ['audio'],
generation_config: {
speech_config: [
{ voice: 'Kore' }
]
},
});
REST
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3.1-flash-tts-preview",
"input": "Say cheerfully: Have a wonderful day!",
"response_modalities": ["audio"],
"generation_config": {
"speech_config": [
{ "voice": "Kore" }
]
}
}'
Sonra (yeni şema)
Python
interaction = client.interactions.create(
model="gemini-3.1-flash-tts-preview",
input="Say cheerfully: Have a wonderful day!",
# response_modalities is removed — use response_format
response_format={
"type": "audio"
},
generation_config={
"speech_config": [
{"voice": "Kore"}
]
}
)
JavaScript
const interaction = await client.interactions.create({
model: 'gemini-3.1-flash-tts-preview',
input: 'Say cheerfully: Have a wonderful day!',
// response_modalities is removed — use response_format
response_format: {
type: 'audio'
},
generation_config: {
speech_config: [
{ voice: 'Kore' }
]
},
});
REST
# Opt-in needed before May 26th
curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-H "Api-Revision: 2026-05-20" \
-d '{
"model": "gemini-3.1-flash-tts-preview",
"input": "Say cheerfully: Have a wonderful day!",
"response_format": {
"type": "audio"
},
"generation_config": {
"speech_config": [
{ "voice": "Kore" }
]
}
}'
Birden fazla çıkış modalitesi (ör. hem metin hem ses) istemek için response_format öğesine tek bir nesne yerine biçim girişlerinden oluşan bir dizi iletin.
Yeni şemaya geçiş yapma
SDK kullanıcıları
En son SDK sürümüne (Python ≥2.0.0, JavaScript ≥2.0.0) yükseltin. SDK, sizi otomatik olarak yeni şemaya dahil eder. Yanıtları okuma şeklinizi güncellemek dışında (yukarıdaki örneklere bakın) herhangi bir kod değişikliği yapmanız gerekmez. Bu SDK sürümlerinde yalnızca yeni şemanın desteklendiğini unutmayın. Eski SDK sürümleri (Python 1.x.x, JavaScript 1.x.x), eski şema 8 Haziran 2026'da kaldırılana kadar çalışmaya devam edecek.
REST API kullanıcıları
Yeni şemayı hemen kullanmaya başlamak için isteklerinize Api-Revision: 2026-05-20 üstbilgisini ekleyin. 26 Mayıs'tan sonra yeni şema, tüm istekler için varsayılan şema haline gelir. API, eski şemayı kalıcı olarak kaldırana kadar Api-Revision: 2026-05-07
ile 8 Haziran'a kadar geçici olarak devre dışı bırakabilirsiniz.
Zaman çizelgesi
| Tarih | Faz | SDK kullanıcıları | REST API kullanıcıları |
|---|---|---|---|
| 7 Mayıs | Etkinleştir | Yeni SDK sürümü kullanıma sunuldu (Python ≥2.0.0, JS ≥2.0.0). Yeni şemayı otomatik olarak almak için yükseltin. | Etkinleştirmek için Api-Revision: 2026-05-20 başlığını ekleyin. Varsayılan olarak eski sürüm kullanılır. |
| 26 Mayıs | Varsayılan çevirme | Daha önce yükselttiyseniz herhangi bir işlem yapmanız gerekmez. Eski SDK'lar (Python 1.x.x, JS 1.x.x) çalışmaya devam eder ancak eski yanıtlar döndürür. | Yeni şema artık varsayılan olarak ayarlandı. Kapsam dışında kalmayı seçmek için Api-Revision: 2026-05-07 üstbilgisini gönderin. |
| 8 Haziran | Gün batımı | Python 1.x.x ve JS 1.x.x SDK sürümleri, Interactions API çağrıları için çalışmayacak. | Interactions API için eski şema kaldırıldı. Api-Revision başlığı yoksayıldı. |
Taşıma Denetim Listesi
Adım şeması (steps)
- Kodu, yanıt içeriğini
outputsyerinestepsdizisinden okuyacak şekilde güncelleyin. Örnekleri inceleyin. - Kodunuzun hem
user_inputhem demodel_outputadım türlerini işlediğini doğrulayın. Örnekleri inceleyin. - (İşlev Çağırma)
stepsdizisindefunction_calladımlarını bulmak için kodu güncelleyin. Örnekleri inceleyin. - (Sunucu Tarafı Araçlar) Araca özgü adımları (ör.
google_search_call,google_search_result) işlemek için kodu güncelleyin. Örnekleri inceleyin. - (Durumsuz Geçmiş) Sonraki isteğin
inputalanındastepsdizisini iletmek için geçmiş yönetimini güncelleyin. Ayrıntıları inceleyin. - (Yalnızca akış) İstemciyi yeni SSE etkinlik türlerini (
interaction.created,step.deltavb.) dinleyecek şekilde güncelleyin. Örnekleri inceleyin.
Çıkış biçimi yapılandırması (response_format)
response_mime_typedeğeriniresponse_formatiçindeki birmime_typealanıyla değiştirin. Örnekleri inceleyin.- Mevcut
response_formatJSON şemanızı bir{"type": "text", "schema": ...}nesnesinin içine yerleştirin. Örnekleri inceleyin. - (Görüntü Üretme)
image_configöğesinigeneration_configkonumundanresponse_formatiçindeki{"type": "image", ...}girişine taşıyın. Örnekleri inceleyin. - (Konuşma Oluşturma)
response_formatiçinderesponse_modalities=["audio"]yerine{"type": "audio"}girişi kullanın. Örnekleri inceleyin. - (Çok formatlı) Birden fazla çıkış biçimi istendiğinde
response_formatöğesini tek bir nesneden diziye dönüştürün.