diff --git a/requirements.txt b/requirements.txt index d758b96a..123aeea5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,31 +19,6 @@ rapidocr_onnxruntime~=1.3.8 requests~=2.31.0 pathlib~=1.0.1 pytest~=7.4.3 -llama-index==0.9.35 - -# jq==1.6.0 -# beautifulsoup4==4.12.2 -# pysrt==1.1.2 -# dashscope==1.13.6 # qwen -# volcengine==1.0.119 # fangzhou -# uncomment libs if you want to use corresponding vector store -# pymilvus==2.3.6 -# psycopg2==2.9.9 -# pgvector>=0.2.4 -# chromadb==0.4.13 - -#flash-attn==2.4.2 # For Orion-14B-Chat and Qwen-14B-Chat -#autoawq==0.1.8 # For Int4 -#rapidocr_paddle[gpu]==1.3.11 # gpu accelleration for ocr of pdf and image files - -arxiv==2.1.0 -youtube-search==2.1.2 -duckduckgo-search==3.9.9 -metaphor-python==0.1.23 - -httpx==0.26.0 -httpx_sse==0.4.0 -watchdog==3.0.0 pyjwt==2.8.0 elasticsearch numexpr>=2.8.8 @@ -53,7 +28,7 @@ tqdm>=4.66.1 websockets>=12.0 numpy>=1.26.3 pandas~=2.1.4 -pydantic<2 +pydantic==1.10.14 httpx[brotli,http2,socks]>=0.25.2 # optional document loaders diff --git a/server/api_server/openai_routes.py b/server/api_server/openai_routes.py index ecc9f03b..beb619b6 100644 --- a/server/api_server/openai_routes.py +++ b/server/api_server/openai_routes.py @@ -74,7 +74,7 @@ async def list_models() -> Dict: try: client = get_OpenAIClient(name, is_async=True) models = await client.models.list() - models = models.dict(exclude=["data", "object"]) + models = models.dict(exclude={"data":..., "object":...}) for x in models: models[x]["platform_name"] = name return models diff --git a/server/reranker/reranker.py b/server/reranker/reranker.py index 5a2de3c4..83792fdc 100644 --- a/server/reranker/reranker.py +++ b/server/reranker/reranker.py @@ -8,8 +8,7 @@ from typing import Optional, Sequence from langchain_core.documents import Document from langchain.callbacks.manager import Callbacks from langchain.retrievers.document_compressors.base import BaseDocumentCompressor -from llama_index.bridge.pydantic import Field, PrivateAttr - +from pydantic import Field, PrivateAttr class LangchainReranker(BaseDocumentCompressor): """Document compressor that uses `Cohere Rerank API`."""