Agent: add support for remote server#1644
Merged
yinghu5 merged 40 commits intoopea-project:mainfrom May 16, 2025
Merged
Conversation
Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: alexsin368 <alex.sin@intel.com>
for more information, see https://pre-commit.ci
4 tasks
louie-tsai
reviewed
May 2, 2025
Signed-off-by: alexsin368 <alex.sin@intel.com>
…GenAIComps into agent-remote-service Signed-off-by: alexsin368 <alex.sin@intel.com>
for more information, see https://pre-commit.ci
alexsin368
commented
May 3, 2025
Collaborator
Author
alexsin368
left a comment
There was a problem hiding this comment.
removed use_remote_service
There was a problem hiding this comment.
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>
Signed-off-by: alexsin368 <alex.sin@intel.com>
louie-tsai
reviewed
May 14, 2025
minmin-intel
approved these changes
May 15, 2025
Signed-off-by: alexsin368 <alex.sin@intel.com>
for more information, see https://pre-commit.ci
This reverts commit b7c4acf.
Signed-off-by: alexsin368 <alex.sin@intel.com>
…GenAIComps into agent-remote-service Signed-off-by: alexsin368 <alex.sin@intel.com>
for more information, see https://pre-commit.ci
Signed-off-by: ZePan110 <ze.pan@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com> Co-authored-by: Lv,Liang1 <liang1.lv@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: ZePan110 <ze.pan@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: alexsin368 <alex.sin@intel.com>
for more information, see https://pre-commit.ci Signed-off-by: alexsin368 <alex.sin@intel.com>
for more information, see https://pre-commit.ci Signed-off-by: alexsin368 <alex.sin@intel.com>
…pea-project#1643) * bug fix for dataingest url Signed-off-by: Mustafa <mustafa.cetin@intel.com> * add validation function Signed-off-by: Mustafa <mustafa.cetin@intel.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * validation update Signed-off-by: Mustafa <mustafa.cetin@intel.com> * [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 <mustafa.cetin@intel.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Mustafa <mustafa.cetin@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
…roject#1645) * Add MariaDB Vector third-party service MariaDB Vector was introduced since MariaDB Server 11.7 Signed-off-by: Razvan-Liviu Varzaru <razvan@mariadb.org> * Add retriever MariaDB Vector integration Signed-off-by: Razvan-Liviu Varzaru <razvan@mariadb.org> * Add dataprep MariaDB Vector integration Signed-off-by: Razvan-Liviu Varzaru <razvan@mariadb.org> * [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 <razvan@mariadb.org> --------- Signed-off-by: Razvan-Liviu Varzaru <razvan@mariadb.org> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
…oject#1676) * Expand test matrix, find all tests use 3rd party Dockerfiles Signed-off-by: chensuyue <suyue.chen@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
Update README.md for first entry of OPEA Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: lvliang-intel <liang1.lv@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
…#1635) Signed-off-by: alexsin368 <alex.sin@intel.com>
* Fix huggingfacehub API upgrade issue Signed-off-by: lvliang-intel <liang1.lv@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: lvliang-intel <liang1.lv@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
…pea-project#1694) Signed-off-by: lvliang-intel <liang1.lv@intel.com> Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: alexsin368 <alex.sin@intel.com>
This reverts commit b7c4acf. Signed-off-by: alexsin368 <alex.sin@intel.com>
Signed-off-by: alexsin368 <alex.sin@intel.com>
…GenAIComps into agent-remote-service Signed-off-by: alexsin368 <alex.sin@intel.com>
for more information, see https://pre-commit.ci
Collaborator
Author
|
need help resolving DCO. steps i followed are not working |
Collaborator
Author
|
ready to merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.