Skip to content

Commit 7f11f1e

Browse files
Use get_AI_token()
1 parent e55d0ca commit 7f11f1e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/seclab_taskflow_agent/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from agents.run import RunHooks
1616
from agents import Agent, Runner, AgentHooks, RunHooks, result, function_tool, Tool, RunContextWrapper, TContext, OpenAIChatCompletionsModel, set_default_openai_client, set_default_openai_api, set_tracing_disabled
1717

18-
from .capi import COPILOT_INTEGRATION_ID, get_AI_endpoint, AI_API_ENDPOINT_ENUM
18+
from .capi import COPILOT_INTEGRATION_ID, get_AI_endpoint, get_AI_token, AI_API_ENDPOINT_ENUM
1919

2020
# grab our secrets from .env, this must be in .gitignore
2121
load_dotenv(find_dotenv(usecwd=True))
@@ -150,7 +150,7 @@ def __init__(self,
150150
run_hooks: TaskRunHooks | None = None,
151151
agent_hooks: TaskAgentHooks | None = None):
152152
client = AsyncOpenAI(base_url=api_endpoint,
153-
api_key=os.getenv('COPILOT_TOKEN'),
153+
api_key=get_AI_token(),
154154
default_headers={'Copilot-Integration-Id': COPILOT_INTEGRATION_ID})
155155
set_default_openai_client(client)
156156
# CAPI does not yet support the Responses API: https://github.com/github/copilot-api/issues/11185

0 commit comments

Comments
 (0)