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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user