1010from semantic_kernel .functions .kernel_function_decorator import kernel_function
1111from semantic_kernel .agents import AzureAIAgentThread
1212
13- # Updated imports for compatibility
14- try :
15- # Try importing from newer structure first
16- from semantic_kernel .contents import ChatHistory , ChatMessageContent
17- except ImportError :
18- # Fall back to older structure for compatibility
19- class ChatMessageContent :
20- """Compatibility class for older SK versions."""
21-
22- def __init__ (self , role = "" , content = "" , name = None ):
23- self .role = role
24- self .content = content
25- self .name = name
26-
27- class ChatHistory :
28- """Compatibility class for older SK versions."""
29-
30- def __init__ (self ):
31- self .messages = []
32-
3313
3414# Import the new AppConfig instance
3515from app_config import config
@@ -53,7 +33,6 @@ class BaseAgent(AzureAIAgent):
5333 def __init__ (
5434 self ,
5535 agent_name : str ,
56- kernel : sk .Kernel ,
5736 session_id : str ,
5837 user_id : str ,
5938 memory_store : CosmosMemoryContext ,
@@ -66,7 +45,6 @@ def __init__(
6645
6746 Args:
6847 agent_name: The name of the agent
69- kernel: The semantic kernel instance
7048 session_id: The session ID
7149 user_id: The user ID
7250 memory_store: The memory context for storing agent state
@@ -82,7 +60,6 @@ def __init__(
8260
8361 # Call AzureAIAgent constructor with required client and definition
8462 super ().__init__ (
85- kernel = kernel ,
8663 deployment_name = None , # Set as needed
8764 plugins = tools , # Use the loaded plugins,
8865 endpoint = None , # Set as needed
@@ -96,7 +73,6 @@ def __init__(
9673
9774 # Store instance variables
9875 self ._agent_name = agent_name
99- self ._kernel = kernel
10076 self ._session_id = session_id
10177 self ._user_id = user_id
10278 self ._memory_store = memory_store
@@ -130,7 +106,6 @@ async def async_init(self):
130106 # Create Azure AI Agent or fallback
131107 if not self ._agent :
132108 self ._agent = await config .create_azure_ai_agent (
133- kernel = self ._kernel ,
134109 agent_name = self ._agent_name ,
135110 instructions = self ._system_message ,
136111 tools = self ._tools ,
0 commit comments