Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #1613

Merged
merged 5 commits into from
Sep 27, 2023
Merged

Dev #1613

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/chat/agent_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async def agent_chat(query: str = Body(..., description="用户输入", examples
),
stream: bool = Body(False, description="流式输出"),
model_name: str = Body(LLM_MODEL, description="LLM 模型名称。"),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", gt=0.0, le=1.0),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", ge=0.0, le=1.0),
# top_p: float = Body(TOP_P, description="LLM 核采样。勿与temperature同时设置", gt=0.0, lt=1.0),
):
history = [History.from_data(h) for h in history]
Expand Down
2 changes: 1 addition & 1 deletion server/chat/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async def chat(query: str = Body(..., description="用户输入", examples=["恼
),
stream: bool = Body(False, description="流式输出"),
model_name: str = Body(LLM_MODEL, description="LLM 模型名称。"),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", gt=0.0, le=1.0),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", ge=0.0, le=1.0),
# top_p: float = Body(TOP_P, description="LLM 核采样。勿与temperature同时设置", gt=0.0, lt=1.0),
prompt_name: str = Body("llm_chat", description="使用的prompt模板名称(在configs/prompt_config.py中配置)"),
):
Expand Down
2 changes: 1 addition & 1 deletion server/chat/knowledge_base_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async def knowledge_base_chat(query: str = Body(..., description="用户输入",
),
stream: bool = Body(False, description="流式输出"),
model_name: str = Body(LLM_MODEL, description="LLM 模型名称。"),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", gt=0.0, le=1.0),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", ge=0.0, le=1.0),
prompt_name: str = Body("knowledge_base_chat", description="使用的prompt模板名称(在configs/prompt_config.py中配置)"),
local_doc_url: bool = Body(False, description="知识文件返回本地路径(true)或URL(false)"),
request: Request = None,
Expand Down
2 changes: 1 addition & 1 deletion server/chat/search_engine_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async def search_engine_chat(query: str = Body(..., description="用户输入",
),
stream: bool = Body(False, description="流式输出"),
model_name: str = Body(LLM_MODEL, description="LLM 模型名称。"),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", gt=0.0, le=1.0),
temperature: float = Body(TEMPERATURE, description="LLM 采样温度", ge=0.0, le=1.0),
prompt_name: str = Body("knowledge_base_chat", description="使用的prompt模板名称(在configs/prompt_config.py中配置)"),
):
if search_engine_name not in SEARCH_ENGINES.keys():
Expand Down
4 changes: 2 additions & 2 deletions server/knowledge_base/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def folder2db(
mode: Literal["recreate_vs", "update_in_db", "increament"],
vs_type: Literal["faiss", "milvus", "pg", "chromadb"] = DEFAULT_VS_TYPE,
embed_model: str = EMBEDDING_MODEL,
chunk_size: int = -1,
chunk_overlap: int = -1,
chunk_size: int = CHUNK_SIZE,
chunk_overlap: int = CHUNK_SIZE,
zh_title_enhance: bool = ZH_TITLE_ENHANCE,
):
'''
Expand Down