Description
Hi,
I have a lifespan method that does call out the initialize orchestrator as follows:
@asynccontextmanager
`
async def lifespan(app: FastAPI):
global kernel, chat_service, request_settings
try:
kernel, chat_service, request_settings = await initialize_orchestrator()
except Exception as e:
raise
yield
# Cleanup on shutdown`
and as follow up, I do have the code where I do register MCP Sse Plugin as:
# genie_plugin = MCPSsePlugin( # name="GenieAgent", # description=""" # Databricks Genie Agent for data analysis and workspace interaction # """, # url="http://genie-mcp.io/sse", # request_timeout=10000000 # ) # await genie_plugin.connect() # kernel.add_plugin(genie_plugin)
At the orchestrator level, I do get the following error message time to time:
File "/usr/local/lib/python3.12/site-packages/semantic_kernel/functions/kernel_function_from_method.py", line 107, in _invoke_internal . File "/usr/local/lib/python3.12/site-packages/semantic_kernel/connectors/mcp.py", line 412, in call_tool. raise FunctionExecutionException(f"Failed to call tool '{tool_name}'.") from ex
Any good practice to handle it and re-establish the connection by the framework?
Metadata
Metadata
Assignees
Type
Projects
Status