mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 12:20:34 +00:00
fix: price page init data;perf: usage code;fix: reasoning tokens;fix: workflow basic node cannot upgrade (#3816)
* fix: img read * fix: price page init data * perf: ai model avatar * perf: refresh in change team * perf: null checker * perf: usage code * fix: reasoning tokens * fix: workflow basic node cannot upgrade * perf: model refresh * perf: icon refresh
This commit is contained in:
@@ -270,7 +270,8 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
|
||||
const AIMessages: ChatCompletionMessageParam[] = [
|
||||
{
|
||||
role: ChatCompletionRequestMessageRoleEnum.Assistant,
|
||||
content: answerText
|
||||
content: answerText,
|
||||
reasoning_text: reasoningText // reasoning_text is only recorded for response, but not for request
|
||||
}
|
||||
];
|
||||
|
||||
|
@@ -232,9 +232,14 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
|
||||
chatNodeUsages = chatNodeUsages.concat(nodeDispatchUsages);
|
||||
}
|
||||
|
||||
if (toolResponses !== undefined) {
|
||||
if (toolResponses !== undefined && toolResponses !== null) {
|
||||
if (Array.isArray(toolResponses) && toolResponses.length === 0) return;
|
||||
if (typeof toolResponses === 'object' && Object.keys(toolResponses).length === 0) return;
|
||||
if (
|
||||
!Array.isArray(toolResponses) &&
|
||||
typeof toolResponses === 'object' &&
|
||||
Object.keys(toolResponses).length === 0
|
||||
)
|
||||
return;
|
||||
toolRunResponse = toolResponses;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user