You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Feature request: structured output for language requirement
Problem
Developers often rely on prompt instructions like "answer in Spanish", which can be unreliable and hard to validate.
Proposed solution
Add a language field in the output schema, so clients can detect/enforce the expected language.
{ "response_language": "es", "answer": "..." }Or:
{ "language": {"code": "es", "name": "Spanish"}, "content": "..." }Example
Prompt: Explain what machine learning is. Language: Spanish
{ "response_language": "es", "answer": "El aprendizaje automático es un campo de la inteligencia artificial..." }Benefits
Questions
Should this be part of ADK’s structured output schema and validated by the SDK?
Beta Was this translation helpful? Give feedback.
All reactions