fix: prompt toolcall ui (#4139)
* load log error adapt * fix: prompt toolcall ui * perf: commercial function tip * update package
This commit is contained in:
@@ -256,7 +256,7 @@ export const GPTMessages2Chats = (
|
||||
) {
|
||||
const value: AIChatItemValueItemType[] = [];
|
||||
|
||||
if (typeof item.reasoning_text === 'string') {
|
||||
if (typeof item.reasoning_text === 'string' && item.reasoning_text) {
|
||||
value.push({
|
||||
type: ChatItemValueTypeEnum.reasoning,
|
||||
reasoning: {
|
||||
@@ -323,7 +323,7 @@ export const GPTMessages2Chats = (
|
||||
interactive: item.interactive
|
||||
});
|
||||
}
|
||||
if (typeof item.content === 'string') {
|
||||
if (typeof item.content === 'string' && item.content) {
|
||||
const lastValue = value[value.length - 1];
|
||||
if (lastValue && lastValue.type === ChatItemValueTypeEnum.text && lastValue.text) {
|
||||
lastValue.text.content += item.content;
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { createChatCompletion } from '../../../../ai/config';
|
||||
import { filterGPTMessageByMaxContext, loadRequestMessages } from '../../../../chat/utils';
|
||||
import {
|
||||
ChatCompletion,
|
||||
StreamChatType,
|
||||
ChatCompletionMessageParam,
|
||||
ChatCompletionAssistantMessageParam
|
||||
} from '@fastgpt/global/core/ai/type';
|
||||
import { StreamChatType, ChatCompletionMessageParam } from '@fastgpt/global/core/ai/type';
|
||||
import { NextApiResponse } from 'next';
|
||||
import { responseWriteController } from '../../../../../common/response';
|
||||
import { SseResponseEventEnum } from '@fastgpt/global/core/workflow/runtime/constants';
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
"common.submit_success": "Submitted Successfully",
|
||||
"common.submitted": "Submitted",
|
||||
"common.support": "Support",
|
||||
"common.system.Commercial version function": "Please Upgrade to the Commercial Version to Use This Feature: https://doc.fastgpt.cn/docs/commercial/intro/",
|
||||
"commercial_function_tip": "Please Upgrade to the Commercial Version to Use This Feature: https://doc.fastgpt.cn/docs/commercial/intro/",
|
||||
"common.system.Help Chatbot": "Help Chatbot",
|
||||
"common.system.Use Helper": "Use Helper",
|
||||
"common.ui.textarea.Magnifying": "Magnifying",
|
||||
|
||||
@@ -260,7 +260,7 @@
|
||||
"common.submit_success": "提交成功",
|
||||
"common.submitted": "已提交",
|
||||
"common.support": "支持",
|
||||
"common.system.Commercial version function": "请升级商业版后使用该功能:https://doc.fastgpt.cn/docs/commercial/intro/",
|
||||
"commercial_function_tip": "请升级商业版后使用该功能:https://doc.fastgpt.cn/docs/commercial/intro/",
|
||||
"common.system.Help Chatbot": "机器人助手",
|
||||
"common.system.Use Helper": "使用帮助",
|
||||
"common.ui.textarea.Magnifying": "放大",
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
"common.submit_success": "送出成功",
|
||||
"common.submitted": "已送出",
|
||||
"common.support": "支援",
|
||||
"common.system.Commercial version function": "請升級為商業版後使用此功能:https://doc.fastgpt.cn/docs/commercial/intro/",
|
||||
"commercial_function_tip": "請升級為商業版後使用此功能:https://doc.fastgpt.cn/docs/commercial/intro/",
|
||||
"common.system.Help Chatbot": "機器人助手",
|
||||
"common.system.Use Helper": "使用說明",
|
||||
"common.ui.textarea.Magnifying": "放大",
|
||||
|
||||
Reference in New Issue
Block a user