| 1234567891011121314151617181920212223242526272829 |
- import { jsonParse, jsonStringify } from '../../utils/utils';
- import { formatCodePython, formatCodeSql } from './format-code-string';
- /**
- * 当用户已发送消息,但是还未返回时
- * 此时界面上应该显示一个Loading状态
- */
- export default function formatDialogChatFinishedMessage(preMsg) {
- // 本次对话的消息内容
- const currentMsg = {
- /**
- * 客户端自定义字段
- */
- client_custom_type: '',
- /**
- * 会话展示时,可以通过此值,判断该如何进行内容显示
- * 当值为0时,可能显示加载中动画
- * 当值为1时,展示消息内容,展示 停止生成按钮
- * 当值为2时,可能展示反馈操作按钮
- */
- client_custom_chat_status: 2, // 此轮会话的状态值 0 加载中 1 进行中 2 已结束
- content: '', // 消息正文,markdown格式,需要进行解析
- system: '' // 系统消息
- };
- return currentMsg;
- }
|