Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning a Fixed Json #56

Open
Praj-17 opened this issue Apr 12, 2024 · 1 comment
Open

Returning a Fixed Json #56

Praj-17 opened this issue Apr 12, 2024 · 1 comment
Labels
component:other Issues unrelated to examples/quickstarts type:help Support-related issues

Comments

@Praj-17
Copy link

Praj-17 commented Apr 12, 2024

Hi I am working on audio understanding and would like the script return me the output in a fixed output format. Something like this

{
    "name": "set_output_json_format",
    "parameters": {
        "type": "object",
        "properties": {
            "count": {
                "type": "string",
                "description": "Represents the number of times the user has chanted correctly"
            },
            "mantra": {
                "type": "string",
                "description": "Represents the mantra chanted"
            }
        }
    }
}

How can I do it in the Audio Script?

@ymodak ymodak added component:other Issues unrelated to examples/quickstarts type:help Support-related issues labels Apr 13, 2024
@MarkDaoust
Copy link
Contributor

Hi, please see this tutorial:

https://ai.google.dev/tutorials/structured_data_extraction

We are working on adding a "json_schema" to the API in the next release, that will make this simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:other Issues unrelated to examples/quickstarts type:help Support-related issues
Projects
None yet
Development

No branches or pull requests

3 participants