bing-chat-api / networks /message_outputer.py
Hansimov's picture
:gem: [Feature] New API with stream reponse via POST request
4c9b469
raw
history blame
445 Bytes
import json
class IdleOutputer:
def output(self, content=None, content_type=None):
return json.dumps({}).encode("utf-8")
class ContentJSONOutputer:
def output(self, content=None, content_type=None):
return (
json.dumps(
{
"content": content,
"content_type": content_type,
}
)
+ "\n"
).encode("utf-8")