SDK for session (#2354)
### What problem does this PR solve? Includes SDK for creating, updating sessions, getting sessions, listing sessions, and dialogues #1102 ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
@@ -17,7 +17,7 @@ from typing import List
|
||||
|
||||
import requests
|
||||
|
||||
from .modules.chat_assistant import Assistant
|
||||
from .modules.assistant import Assistant
|
||||
from .modules.dataset import DataSet
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ class RAGFlow:
|
||||
self.api_url = f"{base_url}/api/{version}"
|
||||
self.authorization_header = {"Authorization": "{} {}".format("Bearer", self.user_key)}
|
||||
|
||||
def post(self, path, param):
|
||||
res = requests.post(url=self.api_url + path, json=param, headers=self.authorization_header)
|
||||
def post(self, path, param, stream=False):
|
||||
res = requests.post(url=self.api_url + path, json=param, headers=self.authorization_header, stream=stream)
|
||||
return res
|
||||
|
||||
def get(self, path, params=None):
|
||||
|
||||
Reference in New Issue
Block a user