File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ async def lifespan(app: fastapi.FastAPI):
84
84
else :
85
85
configure_azure_monitor (connection_string = application_insights_connection_string )
86
86
87
- if os .environ .get ("AZURE_AI_AGENT_ID" ) is not None :
87
+ if os .environ .get ("AZURE_AI_AGENT_ID" ):
88
88
try :
89
89
agent = await ai_client .agents .get_agent (os .environ ["AZURE_AI_AGENT_ID" ])
90
90
logger .info ("Agent already exists, skipping creation" )
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ async def initialize_resources():
116
116
)
117
117
118
118
# If the environment already has AZURE_AI_AGENT_ID, try fetching that agent
119
- if os .environ .get ("AZURE_AI_AGENT_ID" ) is not None :
119
+ if os .environ .get ("AZURE_AI_AGENT_ID" ):
120
120
try :
121
121
agent = await ai_client .agents .get_agent (os .environ ["AZURE_AI_AGENT_ID" ])
122
122
logger .info (f"Found agent by ID: { agent .id } " )
You can’t perform that action at this time.
0 commit comments