mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-23 06:30:00 +08:00
Fix: stream post body (#5434)
### What problem does this PR solve? Fix stream post body ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
4c9a3e918f
commit
230865c4f7
@ -65,7 +65,7 @@ class Session(Base):
|
||||
return message
|
||||
|
||||
def _ask_chat(self, question: str, stream: bool, **kwargs):
|
||||
json_data = {"question": question, "stream": True, "session_id": self.id}
|
||||
json_data = {"question": question, "stream": stream, "session_id": self.id}
|
||||
json_data.update(kwargs)
|
||||
res = self.post(f"/chats/{self.chat_id}/completions",
|
||||
json_data, stream=stream)
|
||||
@ -73,7 +73,7 @@ class Session(Base):
|
||||
|
||||
def _ask_agent(self, question: str, stream: bool):
|
||||
res = self.post(f"/agents/{self.agent_id}/completions",
|
||||
{"question": question, "stream": True, "session_id": self.id}, stream=stream)
|
||||
{"question": question, "stream": stream, "session_id": self.id}, stream=stream)
|
||||
return res
|
||||
|
||||
def update(self, update_message):
|
||||
|
Loading…
x
Reference in New Issue
Block a user