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

[Bug] ChatQnA cannot support authorized LLM service #1453

Open
2 of 8 tasks
gavinlichn opened this issue Jan 22, 2025 · 0 comments
Open
2 of 8 tasks

[Bug] ChatQnA cannot support authorized LLM service #1453

gavinlichn opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@gavinlichn
Copy link
Contributor

gavinlichn commented Jan 22, 2025

Priority

P2-High

OS type

Ubuntu

Hardware type

Xeon-GNR

Installation method

  • Pull docker images from hub.docker.com
  • Build docker images from source
  • Other

Deploy method

  • Docker
  • Docker Compose
  • Kubernetes Helm Charts
  • Kubernetes GMC
  • Other

Running nodes

Single Node

What's the version?

v1.2

Description

For ChatQnA without wrapper flavor, the mega service not support authorized LLM service(as well as other service).
Since previvors Token OpenAI API Key supported by llm usvc, default flavor(no wrapper) cannot support authorized LLM so far.

Modify of mega code as below can resolve this issue, but need to design to compatible with all examples and all services.

diff --git a/comps/cores/mega/orchestrator.py b/comps/cores/mega/orchestrator.py
index 8a75f9cf..3fa7f99e 100644
--- a/comps/cores/mega/orchestrator.py
+++ b/comps/cores/mega/orchestrator.py
@@ -196,7 +196,10 @@ class ServiceOrchestrator(DAG):
             response = requests.post(
                 url=endpoint,
                 data=json.dumps(inputs),
-                headers={"Content-type": "application/json"},
+                headers={
+                    "Content-type": "application/json",
+                    "Authorization": "Bearer API_KEY_TOKENS"
+                    },
                 proxies={"http": None},
                 stream=True,
                 timeout=1000,

Reproduce steps

n/a

Raw log

Attachments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant