From c4c70c47de775a2b69a6a6975296fc97d63c9c80 Mon Sep 17 00:00:00 2001 From: jimmoffet Date: Wed, 30 Oct 2024 00:30:21 -0700 Subject: [PATCH] clea up --- backend/apps/rag/utils.py | 29 ----- installed.txt | 243 -------------------------------------- package.json | 5 +- 3 files changed, 2 insertions(+), 275 deletions(-) delete mode 100644 installed.txt diff --git a/backend/apps/rag/utils.py b/backend/apps/rag/utils.py index 294a0a17d..b4452560b 100644 --- a/backend/apps/rag/utils.py +++ b/backend/apps/rag/utils.py @@ -29,27 +29,6 @@ log.setLevel(SRC_LOG_LEVELS["RAG"]) -# async def query_doc( -# collection_name: str, -# query: str, -# embedding_function, -# k: int, -# ): -# try: -# collection = CHROMA_CLIENT.get_collection(name=collection_name) -# query_embeddings = await embedding_function(query) - -# result = collection.query( -# query_embeddings=[query_embeddings], -# n_results=k, -# ) - -# log.info(f"query_doc:result {result}") -# return result -# except Exception as e: -# raise e - - async def query_doc( collection_name: str, query: str, @@ -68,10 +47,6 @@ async def query_doc( n_results=k, ) - # for doc in result: - # log.debug(f"query_doc result") - # log.debug(f"id {doc['id']}") - # log.debug(f"document {doc['document']}") return result except Exception as e: raise e @@ -454,10 +429,6 @@ async def get_rag_context( log.exception(e) context_string = context_string.strip() - log.info(f"Final context string length: {len(context_string)}") - log.info(f"Number of citations gathered: {len(citations)}") - # log.debug(f"Final context string: {context_string[:200]}...") - # log.debug(f"Citations: {citations}") return context_string, citations diff --git a/installed.txt b/installed.txt deleted file mode 100644 index 02b91282b..000000000 --- a/installed.txt +++ /dev/null @@ -1,243 +0,0 @@ -aiohttp==3.9.5 -aiosignal==1.3.1 -annotated-types==0.7.0 -anyio==4.6.0 -APScheduler==3.10.4 -argon2-cffi==23.1.0 -argon2-cffi-bindings==21.2.0 -asgiref==3.8.1 -attrs==24.2.0 -av==12.3.0 -backoff==2.2.1 -bcrypt==4.1.3 -beautifulsoup4==4.12.3 -bidict==0.23.1 -black==24.4.2 -blinker==1.8.2 -boto3==1.34.110 -botocore==1.34.162 -build==1.2.2 -cachetools==5.5.0 -certifi==2024.8.30 -cffi==1.17.1 -chardet==5.2.0 -charset-normalizer==3.3.2 -chroma-hnswlib==0.7.3 -chromadb==0.5.0 -click==8.1.7 -colorclass==2.2.2 -coloredlogs==15.0.1 -compressed_rtf==1.0.6 -cryptography==43.0.1 -ctranslate2==4.4.0 -dataclasses-json==0.6.7 -deepdiff==8.0.1 -defusedxml==0.7.1 -Deprecated==1.2.14 -dnspython==2.6.1 -docx2txt==0.8 -duckduckgo_search==6.1.12 -durationpy==0.7 -easygui==0.98.3 -ebcdic==1.1.1 -ecdsa==0.19.0 -email_validator==2.2.0 -emoji==2.13.0 -et-xmlfile==1.1.0 -extract-msg==0.49.0 -fake-useragent==1.5.1 -fastapi==0.111.0 -fastapi-cli==0.0.5 -faster-whisper==1.0.2 -filelock==3.16.1 -filetype==1.2.0 -Flask==3.0.3 -Flask-Cors==4.0.1 -flatbuffers==24.3.25 -fonttools==4.53.1 -fpdf2==2.7.9 -frozenlist==1.4.1 -fsspec==2024.9.0 -google-ai-generativelanguage==0.6.4 -google-api-core==2.20.0 -google-api-python-client==2.146.0 -google-auth==2.35.0 -google-auth-httplib2==0.2.0 -google-generativeai==0.5.4 -googleapis-common-protos==1.65.0 -grpcio==1.66.1 -grpcio-status==1.62.3 -h11==0.14.0 -httpcore==1.0.5 -httplib2==0.22.0 -httptools==0.6.1 -httpx==0.27.2 -huggingface-hub==0.25.0 -humanfriendly==10.0 -idna==3.10 -importlib_metadata==8.4.0 -importlib_resources==6.4.5 -iniconfig==2.0.0 -itsdangerous==2.2.0 -Jinja2==3.1.4 -jmespath==1.0.1 -joblib==1.4.2 -jsonpatch==1.33 -jsonpath-python==1.0.6 -jsonpointer==3.0.0 -kubernetes==31.0.0 -langchain==0.2.0 -langchain-chroma==0.1.1 -langchain-community==0.2.0 -langchain-core==0.2.41 -langchain-huggingface==0.1.0 -langchain-postgres==0.0.12 -langchain-text-splitters==0.2.4 -langdetect==1.0.9 -langfuse==2.33.0 -langsmith==0.1.125 -lark==1.1.9 -lxml==5.3.0 -Markdown==3.6 -markdown-it-py==3.0.0 -MarkupSafe==2.1.5 -marshmallow==3.22.0 -mdurl==0.1.2 -ml-dtypes==0.4.1 -mmh3==5.0.0 -monotonic==1.6 -mpmath==1.3.0 -msoffcrypto-tool==5.4.2 -multidict==6.1.0 -mypy-extensions==1.0.0 -nest-asyncio==1.6.0 -networkx==3.3 -nltk==3.9.1 -numpy==1.26.4 -oauthlib==3.2.2 -olefile==0.47 -oletools==0.60.2 -onnxruntime==1.19.2 -opencv-python==4.10.0.84 -opencv-python-headless==4.9.0.80 -openpyxl==3.1.2 -opentelemetry-api==1.27.0 -opentelemetry-exporter-otlp-proto-common==1.27.0 -opentelemetry-exporter-otlp-proto-grpc==1.27.0 -opentelemetry-instrumentation==0.48b0 -opentelemetry-instrumentation-asgi==0.48b0 -opentelemetry-instrumentation-fastapi==0.48b0 -opentelemetry-proto==1.27.0 -opentelemetry-sdk==1.27.0 -opentelemetry-semantic-conventions==0.48b0 -opentelemetry-util-http==0.48b0 -orderly-set==5.2.2 -orjson==3.10.7 -overrides==7.7.0 -packaging==23.2 -pandas==2.2.2 -passlib==1.7.4 -pathspec==0.12.1 -pcodedmp==1.2.6 -peewee==3.17.5 -peewee-migrate==1.12.2 -pgvector==0.2.5 -pillow==10.4.0 -platformdirs==4.3.6 -pluggy==1.5.0 -posthog==3.6.6 -proto-plus==1.24.0 -protobuf==4.25.5 -psycopg==3.2.3 -psycopg-pool==3.2.3 -psycopg2-binary==2.9.9 -pyasn1==0.6.1 -pyasn1_modules==0.4.1 -pyclipper==1.3.0.post5 -pycparser==2.22 -pydantic==2.7.1 -pydantic_core==2.18.2 -pydub==0.25.1 -Pygments==2.18.0 -PyJWT==2.8.0 -PyMySQL==1.1.1 -pypandoc==1.13 -pyparsing==3.1.4 -pypdf==4.2.0 -PyPika==0.48.9 -pyproject_hooks==1.1.0 -pyreqwest_impersonate==0.5.3 -pytest==8.3.3 -pytest-asyncio==0.24.0 -python-dateutil==2.9.0.post0 -python-dotenv==1.0.1 -python-engineio==4.9.1 -python-iso639==2024.4.27 -python-jose==3.3.0 -python-magic==0.4.27 -python-multipart==0.0.9 -python-pptx==0.6.23 -python-socketio==5.11.2 -pytube==15.0.0 -pytz==2024.2 -pyxlsb==1.0.10 -PyYAML==6.0.2 -rank-bm25==0.2.2 -rapidfuzz==3.9.7 -rapidocr-onnxruntime==1.3.22 -red-black-tree-mod==1.20 -redis==5.2.0 -redisvl==0.3.5 -regex==2024.9.11 -requests==2.32.2 -requests-oauthlib==2.0.0 -requests-toolbelt==1.0.0 -rich==13.8.1 -rsa==4.9 -RTFDE==0.1.2 -s3transfer==0.10.2 -safetensors==0.4.5 -scikit-learn==1.5.2 -scipy==1.14.1 -sentence-transformers==2.7.0 -shapely==2.0.6 -shellingham==1.5.4 -simple-websocket==1.0.0 -six==1.16.0 -sniffio==1.3.1 -soupsieve==2.6 -SQLAlchemy==2.0.35 -starlette==0.37.2 -sympy==1.13.3 -tabulate==0.9.0 -tenacity==8.5.0 -threadpoolctl==3.5.0 -tiktoken==0.8.0 -tokenizers==0.19.1 -torch==2.4.1 -tqdm==4.66.5 -transformers==4.44.2 -typer==0.12.5 -typing-inspect==0.9.0 -typing_extensions==4.12.2 -tzdata==2024.1 -tzlocal==5.2 -ujson==5.10.0 -unstructured==0.14.0 -unstructured-client==0.25.9 -uritemplate==4.1.1 -urllib3==2.2.3 -uvicorn==0.22.0 -uvloop==0.20.0 -validators==0.28.1 -watchfiles==0.24.0 -websocket-client==1.8.0 -websockets==13.1 -Werkzeug==3.0.4 -wrapt==1.16.0 -wsproto==1.2.0 -xlrd==2.0.1 -XlsxWriter==3.2.0 -yarl==1.11.1 -youtube-transcript-api==0.6.2 -zipp==3.20.2 diff --git a/package.json b/package.json index 907665fd8..3e6837b67 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,5 @@ "engines": { "node": ">=18.13.0 <=21.x.x", "npm": ">=6.0.0" - }, - "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" -} + } +} \ No newline at end of file