Skip to content

Commit f0c4ef1

Browse files
Use Enum
1 parent 90724ab commit f0c4ef1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/seclab_taskflow_agent/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
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, AI_API_ENDPOINT
18+
from .capi import COPILOT_INTEGRATION_ID, AI_API_ENDPOINT, AI_API_ENDPOINT_ENUM
1919

2020
# grab our secrets from .env, this must be in .gitignore
2121
load_dotenv(find_dotenv(usecwd=True))
2222

2323
match urlparse(AI_API_ENDPOINT).netloc:
24-
case 'api.githubcopilot.com':
24+
case AI_API_ENDPOINT_ENUM.AI_API_GITHUBCOPILOT:
2525
default_model = 'gpt-4o'
26-
case 'models.github.ai':
26+
case AI_API_ENDPOINT_ENUM.AI_API_MODELS_GITHUB:
2727
default_model = 'openai/gpt-4o'
2828
case _:
2929
raise ValueError(f"Unsupported Model Endpoint: {AI_API_ENDPOINT}")

0 commit comments

Comments
 (0)