SDK for session (#2312)

### What problem does this PR solve?

SDK for session
#1102 

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

---------

Co-authored-by: Feiue <10215101452@stu.ecun.edu.cn>
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
LiuHua
2024-09-09 17:18:08 +08:00
committed by GitHub
parent ceae4df889
commit 336a639164
8 changed files with 325 additions and 35 deletions

View File

@@ -17,7 +17,6 @@ from typing import List
import requests
from .modules.chat_assistant import Assistant
from .modules.dataset import DataSet
@@ -88,7 +87,7 @@ class RAGFlow:
datasets.append(dataset.to_json())
if llm is None:
llm = Assistant.LLM(self, {"model_name": "deepseek-chat",
llm = Assistant.LLM(self, {"model_name": None,
"temperature": 0.1,
"top_p": 0.3,
"presence_penalty": 0.4,
@@ -142,4 +141,4 @@ class RAGFlow:
for data in res['data']:
result_list.append(Assistant(self, data))
return result_list
raise Exception(res["retmsg"])
raise Exception(res["retmsg"])