Skip to content

api design: parsed.model_dump() #391

@pearli-pearli

Description

@pearli-pearli

Hey @MadcowD,

Could this be simplified? Thoughts?
I'd like to solve it if it's on the backlog.


This logic confuses me all the time. I think could be refactored.

@web_app.get("/search")
async def search(query: str, video_id: str) -> list[dict]:
    results = deep_search(query, n_results=5).parsed.model_dump()
    return results["results"]

Cheers,
Taha

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions