Skip to content

[Feature] if i want to control the response format, like json_schema , can i write json_schema down the description of outputfeild?? or i need to write elsewhere guys #8028

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

Open
2 tasks
wangweiguo-123 opened this issue Mar 29, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@wangweiguo-123
Copy link

What feature would you like to see?

like output = dspy.outputfeild(desc= """
json_schema: {...}
""")

is it working?? guys , because sometime my response format is not compatible with my json_schema writed in desc , it also may be model promble to return structured response ,right?

Would you like to contribute?

  • Yes, I'd like to help implement this.
  • No, I just want to request it.

Additional Context

No response

@wangweiguo-123 wangweiguo-123 added the enhancement New feature or request label Mar 29, 2025
@okhat
Copy link
Collaborator

okhat commented Mar 29, 2025

Use types, i.e.

your_field: Type = dspy.OutputField()

where Type is a Python type or a Pydantic model, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants