perf: outlink config (#3128)

* update action

* perf: outlink config
This commit is contained in:
Archer
2024-11-12 15:56:53 +08:00
committed by archer
parent 73d28d1fc3
commit 5e273341dd
38 changed files with 469 additions and 537 deletions

View File

@@ -90,6 +90,7 @@ export const chats2GPTMessages = ({
}
} else {
const aiResults: ChatCompletionMessageParam[] = [];
//AI
item.value.forEach((value, i) => {
if (value.type === ChatItemValueTypeEnum.tool && value.tools && reserveTool) {
@@ -130,7 +131,7 @@ export const chats2GPTMessages = ({
if (
lastValue &&
lastValue.type === ChatItemValueTypeEnum.text &&
typeof lastResult.content === 'string'
typeof lastResult?.content === 'string'
) {
lastResult.content += value.text.content;
} else {

View File

@@ -10,7 +10,3 @@ export type AuthOutLinkLimitProps = AuthOutLinkChatProps & { outLink: OutLinkSch
export type AuthOutLinkResponse = {
uid: string;
};
export type AuthOutLinkProps = {
shareId?: string;
outLinkUid?: string;
};

View File

@@ -54,7 +54,7 @@ export type OutLinkSchema<T extends OutlinkAppType = undefined> = {
// whether to hide the node status
showNodeStatus: boolean;
// whether to show the complete quote
showCompleteQuote: boolean;
showRawSource: boolean;
// response when request
immediateResponse?: string;
@@ -84,7 +84,7 @@ export type OutLinkEditType<T = undefined> = {
name: string;
responseDetail?: OutLinkSchema<T>['responseDetail'];
showNodeStatus?: OutLinkSchema<T>['showNodeStatus'];
showCompleteQuote?: OutLinkSchema<T>['showCompleteQuote'];
showRawSource?: OutLinkSchema<T>['showRawSource'];
// response when request
immediateResponse?: string;
// response when error or other situation