From b2a251d104ce1b1fd2db1088979424c3710099c9 Mon Sep 17 00:00:00 2001 From: Sunil Sattiraju Date: Mon, 11 Nov 2024 11:24:24 +0800 Subject: [PATCH] fix missing packages --- backend/app.py | 6 ++---- backend/utils.py | 8 -------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/backend/app.py b/backend/app.py index 02048c9..d25662f 100644 --- a/backend/app.py +++ b/backend/app.py @@ -22,7 +22,8 @@ from backend.data_types import AgentResponse, EndUserMessage, AgentStructuredResponse from backend.otlp_tracing import logger -from backend.utils import initialize_agent_runtime, get_web_pub_client +from backend.utils import initialize_agent_runtime + @asynccontextmanager async def lifespan(app: FastAPI): @@ -37,9 +38,6 @@ async def lifespan(app: FastAPI): # Initialize the agent runtime agent_runtime = await initialize_agent_runtime() - # Create a WebPubSubServiceClient - web_pubsub_client = get_web_pub_client() - # Register the UserProxyAgent instance with the AgentRuntime await UserProxyAgent.register(agent_runtime, "user_proxy", lambda: UserProxyAgent()) diff --git a/backend/utils.py b/backend/utils.py index 8664bc2..f86dad2 100644 --- a/backend/utils.py +++ b/backend/utils.py @@ -6,7 +6,6 @@ from llama_index.core.memory import ChatSummaryMemoryBuffer from llama_index.llms.azure_openai import AzureOpenAI from llama_index.tools.wikipedia import WikipediaToolSpec -from azure.messaging.webpubsubservice import WebPubSubServiceClient from .agents.ext_agents import LlamaIndexAgent from .agents.travel_activities import ActivitiesAgent, get_travel_activity_tools @@ -133,10 +132,3 @@ async def initialize_agent_runtime() -> SingleThreadedAgentRuntime: logger.info("Agent runtime initialized successfully.") return agent_runtime - - -def get_web_pub_client() -> WebPubSubServiceClient: - service = WebPubSubServiceClient.from_connection_string( - Config.WEB_PUB_SUB_CONNECTION_STRING, hub=Config.WEB_PUB_SUB_HUB_NAME - ) - return service