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

Adding Structured output option to OpenAIGenerator #90

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TuanaCelik
Copy link
Contributor

Proposed Changes:

Structured outputs are still a beta feature of OpenAI but they're super useful and I think we should provide an experimental extension to the already existent OpenAIGenerator. This PR adds this feature which calls .parse

How did you test it?

TBD

Notes for the reviewer

Can I have some help: I would like the model to default to gpt-4o-mini in the init...

Checklist

@TuanaCelik TuanaCelik requested a review from a team as a code owner September 13, 2024 13:24
@TuanaCelik TuanaCelik requested review from silvanocerza and removed request for a team September 13, 2024 13:24
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10849979161

Details

  • 16 of 34 (47.06%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.4%) to 93.53%

Changes Missing Coverage Covered Lines Changed/Added Lines %
haystack_experimental/components/generators/openai.py 14 32 43.75%
Totals Coverage Status
Change from base Build 10833606740: -0.4%
Covered Lines: 3368
Relevant Lines: 3601

💛 - Coveralls

@silvanocerza silvanocerza requested review from shadeMe and removed request for silvanocerza September 16, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants