diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..bd3818cf Binary files /dev/null and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index 7be9213d..716b5d33 100644 --- a/.gitignore +++ b/.gitignore @@ -174,4 +174,4 @@ cython_debug/ .pypirc # Local Netlify folder -.netlify +.netlify \ No newline at end of file diff --git a/backend/app/core/config/settings.py b/backend/app/core/config/settings.py index d3a531cb..5ccb79e3 100644 --- a/backend/app/core/config/settings.py +++ b/backend/app/core/config/settings.py @@ -31,6 +31,9 @@ class Settings(BaseSettings): classification_agent_model: str = "gemini-1.5-flash" agent_timeout: int = 30 max_retries: int = 3 + + # RabbitMQ configuration + rabbitmq_url: str = "" # Backend URL backend_url: str = "" diff --git a/backend/app/core/orchestration/queue_manager.py b/backend/app/core/orchestration/queue_manager.py index caef6c53..346bc9a0 100644 --- a/backend/app/core/orchestration/queue_manager.py +++ b/backend/app/core/orchestration/queue_manager.py @@ -3,6 +3,9 @@ from typing import Dict, Any, Callable, Optional from datetime import datetime from enum import Enum +import aio_pika +import json +from app.core.config import settings logger = logging.getLogger(__name__) @@ -12,27 +15,45 @@ class QueuePriority(str, Enum): LOW = "low" class AsyncQueueManager: - """AsyncIO-based queue manager for agent orchestration""" + """Queue manager for agent orchestration""" def __init__(self): self.queues = { - QueuePriority.HIGH: asyncio.Queue(), - QueuePriority.MEDIUM: asyncio.Queue(), - QueuePriority.LOW: asyncio.Queue() + QueuePriority.HIGH: 'high_task_queue', + QueuePriority.MEDIUM: 'medium_task_queue', + QueuePriority.LOW: 'low_task_queue' } self.handlers: Dict[str, Callable] = {} self.running = False self.worker_tasks = [] + self.connection: Optional[aio_pika.RobustConnection] = None + self.channel: Optional[aio_pika.abc.AbstractChannel] = None + + + + async def connect(self): + try: + rabbitmq_url = getattr(settings, 'rabbitmq_url', 'amqp://guest:guest@localhost/') + self.connection = await aio_pika.connect_robust(rabbitmq_url) + self.channel = await self.connection.channel() + # Declare queues + for queue_name in self.queues.values(): + await self.channel.declare_queue(queue_name, durable=True) + logger.info("Successfully connected to RabbitMQ") + except Exception as e: + logger.error(f"Failed to connect to RabbitMQ: {e}") + raise async def start(self, num_workers: int = 3): """Start the queue processing workers""" + await self.connect() self.running = True for i in range(num_workers): task = asyncio.create_task(self._worker(f"worker-{i}")) self.worker_tasks.append(task) - logger.info(f"Started {num_workers} queue workers") + logger.info(f"Started {num_workers} async queue workers") async def stop(self): """Stop the queue processing""" @@ -43,7 +64,11 @@ async def stop(self): task.cancel() await asyncio.gather(*self.worker_tasks, return_exceptions=True) - logger.info("Stopped all queue workers") + if self.channel: + await self.channel.close() + if self.connection: + await self.connection.close() + logger.info("Stopped all queue workers and closed connection") async def enqueue(self, message: Dict[str, Any], @@ -56,13 +81,15 @@ async def enqueue(self, queue_item = { "id": message.get("id", f"msg_{datetime.now().timestamp()}"), - "timestamp": datetime.now().isoformat(), "priority": priority, "data": message } - - await self.queues[priority].put(queue_item) - logger.debug(f"Enqueued message {queue_item['id']} with priority {priority}") + json_message = json.dumps(queue_item).encode() + await self.channel.default_exchange.publish( + aio_pika.Message(body=json_message), + routing_key=self.queues[priority] + ) + logger.info(f"Enqueued message {queue_item['id']} with priority {priority}") def register_handler(self, message_type: str, handler: Callable): """Register a handler for a specific message type""" @@ -72,50 +99,29 @@ def register_handler(self, message_type: str, handler: Callable): async def _worker(self, worker_name: str): """Worker coroutine to process queue items""" logger.info(f"Started queue worker: {worker_name}") - + # Each worker listens to all queues by priority + queues = [ + await self.channel.declare_queue(self.queues[priority], durable=True) + for priority in [QueuePriority.HIGH, QueuePriority.MEDIUM, QueuePriority.LOW] + ] while self.running: - try: - # Process queues by priority - item = await self._get_next_item() - - if item: - await self._process_item(item, worker_name) - else: - # No items available, wait a bit - await asyncio.sleep(0.1) - - except asyncio.CancelledError: - logger.info(f"Worker {worker_name} cancelled") - break - except (ConnectionError, TimeoutError) as e: - logger.error(f"Connection error in worker {worker_name}: {str(e)}") - await asyncio.sleep(5) # Longer pause for connection issues - except Exception as e: - logger.error(f"Unexpected error in worker {worker_name}: {str(e)}") - await asyncio.sleep(1) # Brief pause on error - - async def _get_next_item(self) -> Optional[Dict[str, Any]]: - """Get the next item from queues (priority-based)""" - - # Try high priority first - try: - return self.queues[QueuePriority.HIGH].get_nowait() - except asyncio.QueueEmpty: - pass - - # Then medium priority - try: - return self.queues[QueuePriority.MEDIUM].get_nowait() - except asyncio.QueueEmpty: - pass - - # Finally low priority - try: - return self.queues[QueuePriority.LOW].get_nowait() - except asyncio.QueueEmpty: - pass - - return None + for queue in queues: + try: + message = await queue.get(no_ack=False, fail=False) + if message: + try: + item = json.loads(message.body.decode()) + await self._process_item(item, worker_name) + await message.ack() + except Exception as e: + logger.error(f"Error processing message: {e}") + await message.nack(requeue=False) + except asyncio.CancelledError: + logger.info(f"Worker {worker_name} cancelled") + return + except Exception as e: + logger.error(f"Worker {worker_name} error: {e}") + await asyncio.sleep(0.1) async def _process_item(self, item: Dict[str, Any], worker_name: str): """Process a queue item""" @@ -127,9 +133,12 @@ async def _process_item(self, item: Dict[str, Any], worker_name: str): if handler: logger.debug(f"Worker {worker_name} processing {item['id']} (type: {message_type})") - await handler(message_data) + if asyncio.iscoroutinefunction(handler): + await handler(message_data) + else: + handler(message_data) else: logger.warning(f"No handler found for message type: {message_type}") except Exception as e: - logger.error(f"Error processing item {item['id']}: {str(e)}") + logger.error(f"Error processing item {item.get('id', 'unknown')}: {str(e)}") diff --git a/backend/main.py b/backend/main.py index 912f67b9..94840427 100644 --- a/backend/main.py +++ b/backend/main.py @@ -124,4 +124,4 @@ async def favicon(): host="0.0.0.0", port=8000, reload=True - ) + ) \ No newline at end of file diff --git a/backend/requirements.txt b/backend/requirements.txt index 2e3c1a51..1950ab7a 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -1,231 +1,232 @@ -aiohappyeyeballs==2.6.1 -aiohttp==3.12.12 -aiosignal==1.3.2 -annotated-types==0.7.0 -anyio==4.9.0 -appdirs==1.4.4 -asgiref==3.8.1 -asttokens==3.0.0 -async-timeout==4.0.3 -attrs==25.3.0 -auth0-python==4.9.0 -Authlib==1.3.1 -autoflake==2.3.1 -autopep8==2.3.2 -backoff==2.2.1 -bcrypt==4.3.0 -blinker==1.9.0 -build==1.2.2.post1 -cachetools==5.5.2 -certifi==2025.4.26 -cffi==1.17.1 -charset-normalizer==3.4.2 -chroma-hnswlib==0.7.6 -chromadb==0.6.3 -click==8.1.8 -coloredlogs==15.0.1 -crewai==0.120.1 -cryptography==45.0.4 -decorator==5.2.1 -Deprecated==1.2.18 -deprecation==2.1.0 -docstring_parser==0.16 -durationpy==0.9 -et_xmlfile==2.0.0 -exceptiongroup==1.3.0 -executing==2.2.0 -fastapi==0.115.12 -filelock==3.18.0 -filetype==1.2.0 -flake8==7.2.0 -flatbuffers==25.2.10 -frozenlist==1.7.0 -fsspec==2025.5.1 -google-ai-generativelanguage==0.6.18 -google-api-core==2.25.1 -google-auth==2.40.3 -googleapis-common-protos==1.70.0 -gotrue==2.12.0 -greenlet==3.2.3 -grpcio==1.73.0 -grpcio-health-checking==1.73.0 -grpcio-status==1.73.0 -grpcio-tools==1.73.0 -h11==0.16.0 -h2==4.2.0 -hf-xet==1.1.3 -hpack==4.1.0 -httpcore==1.0.9 -httptools==0.6.4 -httpx==0.28.1 -huggingface-hub==0.33.0 -humanfriendly==10.0 -hyperframe==6.1.0 -idna==3.10 -importlib_metadata==8.6.1 -importlib_resources==6.5.2 -iniconfig==2.1.0 -instructor==1.8.2 -ipython==8.36.0 -isort==6.0.1 -jedi==0.19.2 -Jinja2==3.1.6 -jiter==0.8.2 -joblib==1.5.1 -json5==0.12.0 -json_repair==0.44.1 -jsonpatch==1.33 -jsonpickle==4.0.5 -jsonpointer==3.0.0 -jsonref==1.1.0 -jsonschema==4.23.0 -jsonschema-specifications==2025.4.1 -kubernetes==32.0.1 -langchain==0.3.26 -langchain-core==0.3.66 -langchain-google-genai==2.1.5 -langchain-tavily==0.2.2 -langchain-text-splitters==0.3.8 -langgraph==0.4.8 -langgraph-checkpoint==2.0.26 -langgraph-prebuilt==0.2.2 -langgraph-sdk==0.1.70 -langsmith==0.3.45 -litellm==1.68.0 -markdown-it-py==3.0.0 -MarkupSafe==3.0.2 -matplotlib-inline==0.1.7 -mccabe==0.7.0 -mdurl==0.1.2 -mmh3==5.1.0 -mpmath==1.3.0 -multidict==6.4.4 -mypy==1.16.0 -mypy_extensions==1.1.0 -networkx==3.2.1 -numpy==2.0.2 -nvidia-cublas-cu12==12.6.4.1 -nvidia-cuda-cupti-cu12==12.6.80 -nvidia-cuda-nvrtc-cu12==12.6.77 -nvidia-cuda-runtime-cu12==12.6.77 -nvidia-cudnn-cu12==9.5.1.17 -nvidia-cufft-cu12==11.3.0.4 -nvidia-cufile-cu12==1.11.1.6 -nvidia-curand-cu12==10.3.7.77 -nvidia-cusolver-cu12==11.7.1.2 -nvidia-cusparse-cu12==12.5.4.2 -nvidia-cusparselt-cu12==0.6.3 -nvidia-nccl-cu12==2.26.2 -nvidia-nvjitlink-cu12==12.6.85 -nvidia-nvtx-cu12==12.6.77 -oauthlib==3.2.2 -onnxruntime==1.22.0 -openai==1.75.0 -openpyxl==3.1.5 -opentelemetry-api==1.33.0 -opentelemetry-exporter-otlp-proto-common==1.33.0 -opentelemetry-exporter-otlp-proto-grpc==1.33.0 -opentelemetry-exporter-otlp-proto-http==1.33.0 -opentelemetry-instrumentation==0.54b0 -opentelemetry-instrumentation-asgi==0.54b0 -opentelemetry-instrumentation-fastapi==0.54b0 -opentelemetry-proto==1.33.0 -opentelemetry-sdk==1.33.0 -opentelemetry-semantic-conventions==0.54b0 -opentelemetry-util-http==0.54b0 -orjson==3.10.18 -ormsgpack==1.10.0 -overrides==7.7.0 -packaging==24.2 -parso==0.8.4 -pathspec==0.12.1 -pdfminer.six==20250327 -pdfplumber==0.11.6 -pexpect==4.9.0 -pillow==11.2.1 -pluggy==1.6.0 -postgrest==1.0.2 -posthog==4.0.1 -prompt_toolkit==3.0.51 -propcache==0.3.2 -proto-plus==1.26.1 -protobuf==6.31.1 -ptyprocess==0.7.0 -pure_eval==0.2.3 -py-cord==2.6.1 -pyasn1==0.6.1 -pyasn1_modules==0.4.2 -pycodestyle==2.13.0 -pycparser==2.22 -pydantic==2.11.6 -pydantic-settings==2.9.1 -pydantic_core==2.33.2 -pyflakes==3.3.2 -PyGithub==2.6.1 -Pygments==2.19.1 -PyJWT==2.10.1 -PyNaCl==1.5.0 -pypdfium2==4.30.1 -PyPika==0.48.9 -pyproject_hooks==1.2.0 -pytest==8.4.0 -pytest-mock==3.14.1 -python-dateutil==2.9.0.post0 -python-dotenv==1.1.1 -pyvis==0.3.2 -PyYAML==6.0.2 -realtime==2.4.3 -referencing==0.36.2 -regex==2024.11.6 -requests==2.32.4 -requests-oauthlib==2.0.0 -requests-toolbelt==1.0.0 -rich==13.9.4 -rpds-py==0.25.0 -rsa==4.9.1 -safetensors==0.5.3 -scikit-learn==1.7.0 -scipy==1.15.3 -sentence-transformers==3.4.1 -shellingham==1.5.4 -six==1.17.0 -slack_sdk==3.35.0 -sniffio==1.3.1 -SQLAlchemy==2.0.41 -stack-data==0.6.3 -starlette==0.46.2 -storage3==0.11.3 -StrEnum==0.4.15 -supabase==2.15.3 -supafunc==0.9.4 -sympy==1.14.0 -tavily-python==0.7.6 -tenacity==9.1.2 -threadpoolctl==3.6.0 -tiktoken==0.9.0 -tokenizers==0.21.1 -tomli==2.2.1 -tomli_w==1.2.0 -torch==2.7.1 -tqdm==4.67.1 -traitlets==5.14.3 -transformers==4.52.4 -triton==3.3.1 -typer==0.15.4 -typing-inspection==0.4.1 -typing_extensions==4.14.0 -urllib3==2.4.0 -uv==0.7.4 -uvicorn==0.34.2 -uvloop==0.21.0 -validators==0.34.0 -watchfiles==1.0.5 -wcwidth==0.2.13 -weaviate-client==4.15.4 -websocket-client==1.8.0 -websockets==14.2 -wrapt==1.17.2 -xxhash==3.5.0 -yarl==1.20.1 -zipp==3.21.0 -zstandard==0.23.0 +aiohappyeyeballs==2.6.1 +aiohttp==3.12.12 +aio-pika==9.5.5 +aiosignal==1.3.2 +annotated-types==0.7.0 +anyio==4.9.0 +appdirs==1.4.4 +asgiref==3.8.1 +asttokens==3.0.0 +async-timeout==4.0.3 +attrs==25.3.0 +auth0-python==4.9.0 +Authlib==1.3.1 +autoflake==2.3.1 +autopep8==2.3.2 +backoff==2.2.1 +bcrypt==4.3.0 +blinker==1.9.0 +build==1.2.2.post1 +cachetools==5.5.2 +certifi==2025.4.26 +cffi==1.17.1 +charset-normalizer==3.4.2 +chroma-hnswlib==0.7.6 +chromadb==0.6.3 +click==8.1.8 +coloredlogs==15.0.1 +crewai==0.120.1 +cryptography==45.0.4 +decorator==5.2.1 +Deprecated==1.2.18 +deprecation==2.1.0 +docstring_parser==0.16 +durationpy==0.9 +et_xmlfile==2.0.0 +exceptiongroup==1.3.0 +executing==2.2.0 +fastapi==0.115.12 +filelock==3.18.0 +filetype==1.2.0 +flake8==7.2.0 +flatbuffers==25.2.10 +frozenlist==1.7.0 +fsspec==2025.5.1 +google-ai-generativelanguage==0.6.18 +google-api-core==2.25.1 +google-auth==2.40.3 +googleapis-common-protos==1.70.0 +gotrue==2.12.0 +greenlet==3.2.3 +grpcio==1.73.0 +grpcio-health-checking==1.73.0 +grpcio-status==1.73.0 +grpcio-tools==1.73.0 +h11==0.16.0 +h2==4.2.0 +hf-xet==1.1.3 +hpack==4.1.0 +httpcore==1.0.9 +httptools==0.6.4 +httpx==0.28.1 +huggingface-hub==0.33.0 +humanfriendly==10.0 +hyperframe==6.1.0 +idna==3.10 +importlib_metadata==8.6.1 +importlib_resources==6.5.2 +iniconfig==2.1.0 +instructor==1.8.2 +ipython==8.36.0 +isort==6.0.1 +jedi==0.19.2 +Jinja2==3.1.6 +jiter==0.8.2 +joblib==1.5.1 +json5==0.12.0 +json_repair==0.44.1 +jsonpatch==1.33 +jsonpickle==4.0.5 +jsonpointer==3.0.0 +jsonref==1.1.0 +jsonschema==4.23.0 +jsonschema-specifications==2025.4.1 +kubernetes==32.0.1 +langchain==0.3.26 +langchain-core==0.3.66 +langchain-google-genai==2.1.5 +langchain-tavily==0.2.2 +langchain-text-splitters==0.3.8 +langgraph==0.4.8 +langgraph-checkpoint==2.0.26 +langgraph-prebuilt==0.2.2 +langgraph-sdk==0.1.70 +langsmith==0.3.45 +litellm==1.68.0 +markdown-it-py==3.0.0 +MarkupSafe==3.0.2 +matplotlib-inline==0.1.7 +mccabe==0.7.0 +mdurl==0.1.2 +mmh3==5.1.0 +mpmath==1.3.0 +multidict==6.4.4 +mypy==1.16.0 +mypy_extensions==1.1.0 +networkx==3.2.1 +numpy==2.0.2 +nvidia-cublas-cu12==12.6.4.1 +nvidia-cuda-cupti-cu12==12.6.80 +nvidia-cuda-nvrtc-cu12==12.6.77 +nvidia-cuda-runtime-cu12==12.6.77 +nvidia-cudnn-cu12==9.5.1.17 +nvidia-cufft-cu12==11.3.0.4 +nvidia-cufile-cu12==1.11.1.6 +nvidia-curand-cu12==10.3.7.77 +nvidia-cusolver-cu12==11.7.1.2 +nvidia-cusparse-cu12==12.5.4.2 +nvidia-cusparselt-cu12==0.6.3 +nvidia-nccl-cu12==2.26.2 +nvidia-nvjitlink-cu12==12.6.85 +nvidia-nvtx-cu12==12.6.77 +oauthlib==3.2.2 +onnxruntime==1.22.0 +openai==1.75.0 +openpyxl==3.1.5 +opentelemetry-api==1.33.0 +opentelemetry-exporter-otlp-proto-common==1.33.0 +opentelemetry-exporter-otlp-proto-grpc==1.33.0 +opentelemetry-exporter-otlp-proto-http==1.33.0 +opentelemetry-instrumentation==0.54b0 +opentelemetry-instrumentation-asgi==0.54b0 +opentelemetry-instrumentation-fastapi==0.54b0 +opentelemetry-proto==1.33.0 +opentelemetry-sdk==1.33.0 +opentelemetry-semantic-conventions==0.54b0 +opentelemetry-util-http==0.54b0 +orjson==3.10.18 +ormsgpack==1.10.0 +overrides==7.7.0 +packaging==24.2 +parso==0.8.4 +pathspec==0.12.1 +pdfminer.six==20250327 +pdfplumber==0.11.6 +pexpect==4.9.0 +pillow==11.2.1 +pluggy==1.6.0 +postgrest==1.0.2 +posthog==4.0.1 +prompt_toolkit==3.0.51 +propcache==0.3.2 +proto-plus==1.26.1 +protobuf==6.31.1 +ptyprocess==0.7.0 +pure_eval==0.2.3 +py-cord==2.6.1 +pyasn1==0.6.1 +pyasn1_modules==0.4.2 +pycodestyle==2.13.0 +pycparser==2.22 +pydantic==2.11.6 +pydantic-settings==2.9.1 +pydantic_core==2.33.2 +pyflakes==3.3.2 +PyGithub==2.6.1 +Pygments==2.19.1 +PyJWT==2.10.1 +PyNaCl==1.5.0 +pypdfium2==4.30.1 +PyPika==0.48.9 +pyproject_hooks==1.2.0 +pytest==8.4.0 +pytest-mock==3.14.1 +python-dateutil==2.9.0.post0 +python-dotenv==1.1.1 +pyvis==0.3.2 +PyYAML==6.0.2 +realtime==2.4.3 +referencing==0.36.2 +regex==2024.11.6 +requests==2.32.4 +requests-oauthlib==2.0.0 +requests-toolbelt==1.0.0 +rich==13.9.4 +rpds-py==0.25.0 +rsa==4.9.1 +safetensors==0.5.3 +scikit-learn==1.7.0 +scipy==1.15.3 +sentence-transformers==3.4.1 +shellingham==1.5.4 +six==1.17.0 +slack_sdk==3.35.0 +sniffio==1.3.1 +SQLAlchemy==2.0.41 +stack-data==0.6.3 +starlette==0.46.2 +storage3==0.11.3 +StrEnum==0.4.15 +supabase==2.15.3 +supafunc==0.9.4 +sympy==1.14.0 +tavily-python==0.7.6 +tenacity==9.1.2 +threadpoolctl==3.6.0 +tiktoken==0.9.0 +tokenizers==0.21.1 +tomli==2.2.1 +tomli_w==1.2.0 +torch==2.7.1 +tqdm==4.67.1 +traitlets==5.14.3 +transformers==4.52.4 +triton==3.3.1 +typer==0.15.4 +typing-inspection==0.4.1 +typing_extensions==4.14.0 +urllib3==2.4.0 +uv==0.7.4 +uvicorn==0.34.2 +uvloop==0.21.0 +validators==0.34.0 +watchfiles==1.0.5 +wcwidth==0.2.13 +weaviate-client==4.15.4 +websocket-client==1.8.0 +websockets==14.2 +wrapt==1.17.2 +xxhash==3.5.0 +yarl==1.20.1 +zipp==3.21.0 +zstandard==0.23.0 \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 3672fff6..d30dc75c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,5 +1,23 @@ # This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +[[package]] +name = "aio-pika" +version = "9.5.5" +description = "Wrapper around the aiormq for asyncio and humans" +optional = false +python-versions = "<4.0,>=3.9" +groups = ["main"] +files = [ + {file = "aio_pika-9.5.5-py3-none-any.whl", hash = "sha256:94e0ac3666398d6a28b0c3b530c1febf4c6d4ececb345620727cfd7bfe1c02e0"}, + {file = "aio_pika-9.5.5.tar.gz", hash = "sha256:3d2f25838860fa7e209e21fc95555f558401f9b49a832897419489f1c9e1d6a4"}, +] + +[package.dependencies] +aiormq = ">=6.8,<6.9" +exceptiongroup = ">=1,<2" +typing-extensions = {version = "*", markers = "python_version < \"3.10\""} +yarl = "*" + [[package]] name = "aiohappyeyeballs" version = "2.6.1" @@ -121,6 +139,22 @@ yarl = ">=1.17.0,<2.0" [package.extras] speedups = ["Brotli ; platform_python_implementation == \"CPython\"", "aiodns (>=3.3.0)", "brotlicffi ; platform_python_implementation != \"CPython\""] +[[package]] +name = "aiormq" +version = "6.8.1" +description = "Pure python AMQP asynchronous client library" +optional = false +python-versions = "<4.0,>=3.8" +groups = ["main"] +files = [ + {file = "aiormq-6.8.1-py3-none-any.whl", hash = "sha256:5da896c8624193708f9409ffad0b20395010e2747f22aa4150593837f40aa017"}, + {file = "aiormq-6.8.1.tar.gz", hash = "sha256:a964ab09634be1da1f9298ce225b310859763d5cf83ef3a7eae1a6dc6bd1da1a"}, +] + +[package.dependencies] +pamqp = "3.3.0" +yarl = "*" + [[package]] name = "aiosignal" version = "1.3.2" @@ -457,6 +491,38 @@ files = [ {file = "charset_normalizer-3.4.2.tar.gz", hash = "sha256:5baececa9ecba31eff645232d59845c07aa030f0c81ee70184a90d35099a0e63"}, ] +[[package]] +name = "click" +version = "8.1.8" +description = "Composable command line interface toolkit" +optional = false +python-versions = ">=3.7" +groups = ["main"] +markers = "python_version < \"3.11\"" +files = [ + {file = "click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2"}, + {file = "click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "click" +version = "8.2.1" +description = "Composable command line interface toolkit" +optional = false +python-versions = ">=3.10" +groups = ["main"] +markers = "python_version >= \"3.11\"" +files = [ + {file = "click-8.2.1-py3-none-any.whl", hash = "sha256:61a3265b914e850b85317d0b3109c7f8cd35a670f963866005d6ef1d5175a12b"}, + {file = "click-8.2.1.tar.gz", hash = "sha256:27c491cc05d968d271d5a1db13e3b5a184636d9d930f148c50b038f0d0646202"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + [[package]] name = "colorama" version = "0.4.6" @@ -622,11 +688,11 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main", "dev"] -markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.3.0-py3-none-any.whl", hash = "sha256:4d111e6e0c13d0644cad6ddaa7ed0261a0b36971f6d23e7ec9b4b9097da78a10"}, {file = "exceptiongroup-1.3.0.tar.gz", hash = "sha256:b241f5885f560bc56a59ee63ca4c6a8bfa46ae4ad651af316d4e81817bb9fd88"}, ] +markers = {dev = "python_version < \"3.11\""} [package.dependencies] typing-extensions = {version = ">=4.6.0", markers = "python_version < \"3.13\""} @@ -2492,6 +2558,22 @@ files = [ {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] +[[package]] +name = "pamqp" +version = "3.3.0" +description = "RabbitMQ Focused AMQP low-level library" +optional = false +python-versions = ">=3.7" +groups = ["main"] +files = [ + {file = "pamqp-3.3.0-py2.py3-none-any.whl", hash = "sha256:c901a684794157ae39b52cbf700db8c9aae7a470f13528b9d7b4e5f7202f8eb0"}, + {file = "pamqp-3.3.0.tar.gz", hash = "sha256:40b8795bd4efcf2b0f8821c1de83d12ca16d5760f4507836267fd7a02b06763b"}, +] + +[package.extras] +codegen = ["lxml", "requests", "yapf"] +testing = ["coverage", "flake8", "flake8-comprehensions", "flake8-deprecated", "flake8-import-order", "flake8-print", "flake8-quotes", "flake8-rst-docstrings", "flake8-tuple", "yapf"] + [[package]] name = "pathspec" version = "0.12.1" @@ -4357,6 +4439,26 @@ h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] +[[package]] +name = "uvicorn" +version = "0.35.0" +description = "The lightning-fast ASGI server." +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "uvicorn-0.35.0-py3-none-any.whl", hash = "sha256:197535216b25ff9b785e29a0b79199f55222193d47f820816e7da751e9bc8d4a"}, + {file = "uvicorn-0.35.0.tar.gz", hash = "sha256:bc662f087f7cf2ce11a1d7fd70b90c9f98ef2e2831556dd078d131b96cc94a01"}, +] + +[package.dependencies] +click = ">=7.0" +h11 = ">=0.8" +typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} + +[package.extras] +standard = ["colorama (>=0.4) ; sys_platform == \"win32\"", "httptools (>=0.6.3)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.15.1) ; sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\"", "watchfiles (>=0.13)", "websockets (>=10.4)"] + [[package]] name = "validators" version = "0.34.0" @@ -4933,4 +5035,4 @@ cffi = ["cffi (>=1.11)"] [metadata] lock-version = "2.1" python-versions = ">=3.9, <4.0" -content-hash = "e522e012ca2cf1b0e41d143829af4aeaee30ce66714794ab238d644134e6d28c" +content-hash = "f00e5f86781e9cbfb6a4e28aa95c1ddd2923123f7e8bbbfdc814a1c099690aa9" diff --git a/pyproject.toml b/pyproject.toml index e5861d13..2124898e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,8 @@ dependencies = [ "weaviate-client (>=4.15.0,<5.0.0)", "langchain-google-genai (>=2.1.5,<3.0.0)", "python-dotenv (>=1.1.1,<2.0.0)", + "aio-pika (>=9.5.5,<10.0.0)", + "uvicorn (>=0.35.0,<0.36.0)", ] [tool.poetry]