Refactor Chat API (#2804)

### What problem does this PR solve?

Refactor Chat API

### Type of change

- [x] Refactoring

---------

Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
liuhua
2024-10-12 13:48:43 +08:00
committed by GitHub
parent 2a86472b88
commit a20b82092f
14 changed files with 883 additions and 652 deletions

View File

@@ -18,16 +18,16 @@ class Base(object):
pr[name] = value
return pr
def post(self, path, param, stream=False):
res = self.rag.post(path, param, stream=stream)
def post(self, path, json, stream=False):
res = self.rag.post(path, json, stream=stream)
return res
def get(self, path, params):
res = self.rag.get(path, params)
return res
def rm(self, path, params):
res = self.rag.delete(path, params)
def rm(self, path, json):
res = self.rag.delete(path, json)
return res
def put(self,path, json):