Skip to content

feat: Allow OpenAI client config in other components #9270

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

Conversation

alexengrig
Copy link
Contributor

Related Issues

Proposed Changes:

When using components with an OpenAI client, we can configure the HTTP client.

How did you test it?

Updated the existing tests.

Notes for the reviewer

This PR completes #9215 for other components:

  • AzureOpenAIGenerator, OpenAIGenerator and DALLEImageGenerator
  • OpenAIDocumentEmbedder and OpenAITextEmbedder
  • RemoteWhisperTranscriber

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@alexengrig alexengrig requested review from a team as code owners April 18, 2025 23:30
@alexengrig alexengrig requested review from dfokina and julian-risch and removed request for a team April 18, 2025 23:30
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Apr 18, 2025
@coveralls
Copy link
Collaborator

coveralls commented Apr 22, 2025

Pull Request Test Coverage Report for Build 14591523099

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 55 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.01%) to 90.514%

Files with Coverage Reduction New Missed Lines %
components/generators/openai_dalle.py 1 97.62%
components/generators/azure.py 4 91.84%
components/generators/openai.py 4 95.74%
components/embedders/openai_text_embedder.py 6 88.68%
components/audio/whisper_remote.py 11 70.45%
components/embedders/openai_document_embedder.py 29 61.95%
Totals Coverage Status
Change from base Build 14589393396: 0.01%
Covered Lines: 10830
Relevant Lines: 11965

💛 - Coveralls

@julian-risch julian-risch requested review from Amnah199 and removed request for julian-risch April 22, 2025 07:08
Copy link
Contributor

@Amnah199 Amnah199 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

@julian-risch julian-risch enabled auto-merge (squash) April 22, 2025 09:40
@julian-risch julian-risch merged commit 1466941 into deepset-ai:main Apr 22, 2025
17 checks passed
@Amnah199
Copy link
Contributor

Thanks @alexengrig, for following up on this issue and pushing the PR forward. Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add passing http_client to OpenAI clients
4 participants