app.chat_utils module¶
- app.chat_utils.add_comment_to_QA(request: HttpRequest) dict [源代码]¶
- app.chat_utils.change_chat_status(chat_id: int, to_status: Status) dict [源代码]¶
修改chat的状态
:param chat_id :type chat_id: int :param to_status: 目标状态 :type to_status: Chat.Status :return: 表明成功与否的MESSAGECONTEXT :rtype: MESSAGECONTEXT
- app.chat_utils.create_QA(request: HttpRequest, respondent: User, directed: bool, questioner_anonymous: bool, keywords: None | list[str] = None) dict [源代码]¶
创建学术地图问答,包括定向和非定向
- 参数:
respondent (User) -- 回答者
directed (bool) -- 是否为定向问答
questioner_anonymous (bool) -- 提问者是否匿名
keywords (None | list[str]) -- 关键词,暂时只在非定向问答中使用,用来定位回答者。