Skip to content

Commit

Permalink
ChatQnA can support authorized LLM service.
Browse files Browse the repository at this point in the history
Signed-off-by: Yugar-1 <[email protected]>
  • Loading branch information
Yugar-1 committed Feb 8, 2025
1 parent ecb7f7b commit 317f7a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion comps/cores/mega/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

logger = CustomLogger("comps-core-orchestrator")
LOGFLAG = os.getenv("LOGFLAG", False)
API_KEY_TOKENS = os.getenv("API_KEY_TOKEN", "EMPTY")


class OrchestratorMetrics:
Expand Down Expand Up @@ -259,7 +260,10 @@ async def execute(
response = requests.post(
url=endpoint,
data=json.dumps(inputs),
headers={"Content-type": "application/json"},
headers={
"Content-type": "application/json",
"Authorization": f"Bearer {API_KEY_TOKENS}"
},
proxies={"http": None},
stream=True,
timeout=1000,
Expand Down

0 comments on commit 317f7a0

Please sign in to comment.