fix(mcp): restore mcp_servers attribute and update typing imports for Python 3.10 compatibility

pull/819/head
Pavan Kumar 3 months ago committed by ascender1729
parent 242cfcd4b1
commit 1a075caeb0

@ -404,7 +404,7 @@ class Agent:
role: agent_roles = "worker", role: agent_roles = "worker",
no_print: bool = False, no_print: bool = False,
tools_list_dictionary: Optional[List[Dict[str, Any]]] = None, tools_list_dictionary: Optional[List[Dict[str, Any]]] = None,
# mcp_servers: List[MCPServerSseParams] = [], mcp_servers: Optional[list] = None, # list[MCPServerSseParams]
*args, *args,
**kwargs, **kwargs,
): ):
@ -524,7 +524,7 @@ class Agent:
self.role = role self.role = role
self.no_print = no_print self.no_print = no_print
self.tools_list_dictionary = tools_list_dictionary self.tools_list_dictionary = tools_list_dictionary
# self.mcp_servers = mcp_servers self.mcp_servers = mcp_servers
self._cached_llm = ( self._cached_llm = (
None # Add this line to cache the LLM instance None # Add this line to cache the LLM instance

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
from typing import Any, Dict, List, Optional, TypedDict, NotRequired from typing import Any, Dict, List, Optional
from typing_extensions import TypedDict from typing_extensions import NotRequired, TypedDict
from contextlib import AbstractAsyncContextManager from contextlib import AbstractAsyncContextManager
from fastmcp import FastClientSession as ClientSession from fastmcp import FastClientSession as ClientSession
from fastmcp.servers import fast_sse_client as sse_client from fastmcp.servers import fast_sse_client as sse_client

Loading…
Cancel
Save