mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Add comment to sample
This commit is contained in:
@@ -1439,7 +1439,8 @@ class MCPTool:
|
||||
continue
|
||||
except Exception as reconn_ex:
|
||||
raise ToolExecutionException(
|
||||
"Failed to reconnect to MCP server.", inner_exception=reconn_ex
|
||||
"Failed to reconnect to MCP server.",
|
||||
inner_exception=reconn_ex,
|
||||
) from reconn_ex
|
||||
|
||||
# Second attempt also failed, give up.
|
||||
|
||||
@@ -46,6 +46,8 @@ async def github_mcp_example() -> None:
|
||||
# The MCP tool manages the connection to the MCP server and makes its tools available
|
||||
# Set approval_mode="never_require" to allow the MCP tool to execute without approval
|
||||
client = OpenAIChatClient()
|
||||
# Note that the tool created here will be executed remotely by OpenAI, not locally by
|
||||
# your application.
|
||||
github_mcp_tool = client.get_mcp_tool(
|
||||
name="GitHub",
|
||||
url="https://api.githubcopilot.com/mcp/",
|
||||
|
||||
Reference in New Issue
Block a user