-
Notifications
You must be signed in to change notification settings - Fork 196
Agent: add support for remote server #1644
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
Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: alexsin368 <[email protected]>
…GenAIComps into agent-remote-service Signed-off-by: alexsin368 <[email protected]>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed use_remote_service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for using a remote server inference endpoint by enabling the use of an API key when initializing the ChatOpenAI client. Key changes include:
- Updating the ChatOpenAI initialization in utils.py to append "/v1" to the remote endpoint when an API key is provided.
- Adding a new argparse argument "--api_key" and corresponding environment variable handling in config.py.
- Updating README.md to document how to use remote servers with the new API key support.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
comps/agent/src/integrations/utils.py | Adds conditional initialization of ChatOpenAI using an API key. |
comps/agent/src/integrations/config.py | Supports reading the api_key from environment variables. |
comps/agent/src/README.md | Updates documentation to instruct on running LLMs with remote servers. |
Comments suppressed due to low confidence (1)
comps/agent/src/README.md:119
- [nitpick] The documentation uses 'LLM_ENDPOINT_URL' while the configuration code expects 'llm_endpoint_url'. Consider aligning the environment variable naming for consistency.
- `LLM_ENDPOINT_URL`=<inference-endpoint>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
for more information, see https://pre-commit.ci
This reverts commit b7c4acf.
Signed-off-by: alexsin368 <[email protected]>
…GenAIComps into agent-remote-service Signed-off-by: alexsin368 <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: ZePan110 <[email protected]> Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: Ye, Xinyu <[email protected]> Co-authored-by: Lv,Liang1 <[email protected]> Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: ZePan110 <[email protected]> Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
for more information, see https://pre-commit.ci Signed-off-by: alexsin368 <[email protected]>
for more information, see https://pre-commit.ci Signed-off-by: alexsin368 <[email protected]>
…pea-project#1643) * bug fix for dataingest url Signed-off-by: Mustafa <[email protected]> * add validation function Signed-off-by: Mustafa <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * validation update Signed-off-by: Mustafa <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update validation function Signed-off-by: Mustafa <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Mustafa <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: alexsin368 <[email protected]>
…roject#1645) * Add MariaDB Vector third-party service MariaDB Vector was introduced since MariaDB Server 11.7 Signed-off-by: Razvan-Liviu Varzaru <[email protected]> * Add retriever MariaDB Vector integration Signed-off-by: Razvan-Liviu Varzaru <[email protected]> * Add dataprep MariaDB Vector integration Signed-off-by: Razvan-Liviu Varzaru <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix CI failures - md5 is used for the primary key not as a security hash - fixed mariadb readme headers Signed-off-by: Razvan-Liviu Varzaru <[email protected]> --------- Signed-off-by: Razvan-Liviu Varzaru <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: chensuyue <[email protected]> Signed-off-by: alexsin368 <[email protected]>
…oject#1676) * Expand test matrix, find all tests use 3rd party Dockerfiles Signed-off-by: chensuyue <[email protected]> Signed-off-by: alexsin368 <[email protected]>
Update README.md for first entry of OPEA Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: lvliang-intel <[email protected]> Signed-off-by: alexsin368 <[email protected]>
…#1635) Signed-off-by: alexsin368 <[email protected]>
* Fix huggingfacehub API upgrade issue Signed-off-by: lvliang-intel <[email protected]> Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: lvliang-intel <[email protected]> Signed-off-by: alexsin368 <[email protected]>
…pea-project#1694) Signed-off-by: lvliang-intel <[email protected]> Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
This reverts commit b7c4acf. Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
…GenAIComps into agent-remote-service Signed-off-by: alexsin368 <[email protected]>
for more information, see https://pre-commit.ci
need help resolving DCO. steps i followed are not working |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
ready to merge! |
Description
Add support for usage of a remote server inference endpoint. Supports Enterprise Inference.
Related PR: opea-project/GenAIExamples#1900
Issues
N/A
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
None
Tests
Tested with AgentQnA consuming this agent microservice where chat completions were showing on the UI.