Skip to content

Commit

Permalink
fix missing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
lordlinus committed Nov 11, 2024
1 parent efe532d commit b2a251d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
6 changes: 2 additions & 4 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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())

Expand Down
8 changes: 0 additions & 8 deletions backend/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit b2a251d

Please sign in to comment.