for completion api, is there document on how to start from a new dialog/conversion/chat? #7236
Replies: 1 comment
-
Hello @dukedai-airr! I'm Dosu, your friendly bot here to help you solve bugs, answer questions, and become a contributor. I'm here to assist you while we wait for a human maintainer. How can I help you today? To start a new dialog or conversation using the completion API, you need to create a new chat entry by making a POST request to the @manager.route('/chats', methods=['POST']) # noqa: F821
@token_required
def create(tenant_id):
req = request.json
req["id"] = get_uuid() # Generates a new unique chat_id
# Additional setup for the chat
if not DialogService.save(**req):
return get_error_data_result(message="Fail to new a chat!")
e, res = DialogService.get_by_id(req["id"])
if not e:
return get_error_data_result(message="Fail to new a chat!")
res = res.to_json()
return get_result(data=res) Regarding the error message "You don't own the chat," this occurs when the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other |
Beta Was this translation helpful? Give feedback.
-
For current doc, I can't find out how to make the chat_id.
if use the chat_id from UI, it'll throw
{ "code": 102, "message": "You don't own the chat 4073c025ab25424cbc31068846ba7a6f" }
Beta Was this translation helpful? Give feedback.
All reactions