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

Remote TGI/TGI services with OAuth Client Credentials authentication #836

Merged
merged 7 commits into from
Oct 31, 2024

Conversation

sgurunat
Copy link
Contributor

Description

To support remote TGI/TEI endpoints instead of running it locally along with if these endpoints are protected with OAuth Client Credentials flow.

Issues

n/a

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Added get_access_token method in utils.py to get the OAuth Client Credentials flow by taking parameters clientid, clientsecret and tokenurl from environment variables. Using utils.py so that the fucntion can be reused in multiple places.

Added authentication i.e Authorization header to pass the token in multiple components like embedding, llm-faqgen, llm-sumarization, llm-text-generation and reranking files. These components uses the common get_access_token method from utils.

Dependencies

List the newly introduced 3rd party dependency if exists.

Tests

Describe the tests that you ran to verify your changes.

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
comps/cores/mega/utils.py 25.00% 9 Missing ⚠️
Files with missing lines Coverage Δ
comps/cores/mega/utils.py 24.42% <25.00%> (+0.05%) ⬆️

... and 3 files with indirect coverage changes

@lvliang-intel lvliang-intel merged commit 74df6bb into opea-project:main Oct 31, 2024
18 checks passed
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.

4 participants