update reqs and server/utils
This commit is contained in:
parent
7e99cc12b3
commit
072e0a2a32
|
|
@ -15,7 +15,7 @@ nltk>=3.8.1
|
||||||
uvicorn~=0.23.1
|
uvicorn~=0.23.1
|
||||||
starlette~=0.27.0
|
starlette~=0.27.0
|
||||||
pydantic<2
|
pydantic<2
|
||||||
unstructured[all-docs]>=0.11.0
|
unstructured[all-docs]==0.11.0
|
||||||
python-magic-bin; sys_platform == 'win32'
|
python-magic-bin; sys_platform == 'win32'
|
||||||
SQLAlchemy==2.0.19
|
SQLAlchemy==2.0.19
|
||||||
faiss-cpu
|
faiss-cpu
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ nltk>=3.8.1
|
||||||
uvicorn~=0.23.1
|
uvicorn~=0.23.1
|
||||||
starlette~=0.27.0
|
starlette~=0.27.0
|
||||||
pydantic<2
|
pydantic<2
|
||||||
unstructured[all-docs]>=0.11.0
|
unstructured[all-docs]==0.11.0
|
||||||
python-magic-bin; sys_platform == 'win32'
|
python-magic-bin; sys_platform == 'win32'
|
||||||
SQLAlchemy==2.0.19
|
SQLAlchemy==2.0.19
|
||||||
faiss-cpu
|
faiss-cpu
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ nltk~=3.8.1
|
||||||
uvicorn~=0.23.1
|
uvicorn~=0.23.1
|
||||||
starlette~=0.27.0
|
starlette~=0.27.0
|
||||||
pydantic~=1.10.11
|
pydantic~=1.10.11
|
||||||
unstructured[docx,csv]>=0.10.4 # add pdf if need
|
unstructured[docx,csv]==0.11.0 # add pdf if need
|
||||||
python-magic-bin; sys_platform == 'win32'
|
python-magic-bin; sys_platform == 'win32'
|
||||||
SQLAlchemy==2.0.19
|
SQLAlchemy==2.0.19
|
||||||
faiss-cpu
|
faiss-cpu
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ def get_ChatOpenAI(
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> ChatOpenAI:
|
) -> ChatOpenAI:
|
||||||
config = get_model_worker_config(model_name)
|
config = get_model_worker_config(model_name)
|
||||||
if config.get("openai-api"):
|
if model_name == "openai-api":
|
||||||
model_name = config.get("model_name")
|
model_name = config.get("model_name")
|
||||||
model = ChatOpenAI(
|
model = ChatOpenAI(
|
||||||
streaming=streaming,
|
streaming=streaming,
|
||||||
|
|
@ -56,6 +56,7 @@ def get_ChatOpenAI(
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
return model
|
return model
|
||||||
|
|
||||||
def get_OpenAI(
|
def get_OpenAI(
|
||||||
model_name: str,
|
model_name: str,
|
||||||
temperature: float,
|
temperature: float,
|
||||||
|
|
@ -67,7 +68,7 @@ def get_OpenAI(
|
||||||
**kwargs: Any,
|
**kwargs: Any,
|
||||||
) -> OpenAI:
|
) -> OpenAI:
|
||||||
config = get_model_worker_config(model_name)
|
config = get_model_worker_config(model_name)
|
||||||
if config.get("openai-api"):
|
if model_name == "openai-api":
|
||||||
model_name = config.get("model_name")
|
model_name = config.get("model_name")
|
||||||
model = OpenAI(
|
model = OpenAI(
|
||||||
streaming=streaming,
|
streaming=streaming,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue