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

chore: OpenAITextEmbedder - remove unused constants #8669

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

anakin87
Copy link
Member

Related issues

The constants below were introduced in #7653

OPENAI_TIMEOUT = float(os.environ.get("OPENAI_TIMEOUT", 30))
OPENAI_MAX_RETRIES = int(os.environ.get("OPENAI_MAX_RETRIES", 5))

but the actual access to env vars happen here:

if timeout is None:
timeout = float(os.environ.get("OPENAI_TIMEOUT", 30.0))
if max_retries is None:
max_retries = int(os.environ.get("OPENAI_MAX_RETRIES", 5))

Proposed Changes:

  • Remove the unused constants

How did you test it?

CI

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

@anakin87 anakin87 added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Dec 20, 2024
@coveralls
Copy link
Collaborator

coveralls commented Dec 20, 2024

Pull Request Test Coverage Report for Build 12435310760

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 8 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.002%) to 90.952%

Files with Coverage Reduction New Missed Lines %
components/embedders/openai_text_embedder.py 8 74.36%
Totals Coverage Status
Change from base Build 12433239243: -0.002%
Covered Lines: 8504
Relevant Lines: 9350

💛 - Coveralls

@anakin87 anakin87 marked this pull request as ready for review December 20, 2024 16:55
@anakin87 anakin87 requested a review from a team as a code owner December 20, 2024 16:55
@anakin87 anakin87 requested review from vblagoje and removed request for a team December 20, 2024 16:55
@anakin87 anakin87 merged commit 3ea128c into main Dec 21, 2024
28 of 29 checks passed
@anakin87 anakin87 deleted the openai-embedder-rm-unused-code branch December 21, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release-notes PRs with this flag won't be included in the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants