in AI_Agent_Service/CustomAIAgent.py [0:0]
def __init__(self, agent_name: str, agent_instructions: str, tool_set: ToolSet, model: str = "gpt-4o-mini"):
self._agent_name = agent_name
self._project_client = AIProjectClient.from_connection_string(
credential=DefaultAzureCredential(), conn_str=os.environ["PROJECT_CONNECTION_STRING"]
)
self._agent_instance = self._project_client.agents.create_agent(
model=model,
name=agent_name,
instructions=agent_instructions,
toolset=tool_set
)