Skip to content

Commit

Permalink
Revert "修复API系统提示词无效问题"
Browse files Browse the repository at this point in the history
This reverts commit ffb90d7.
  • Loading branch information
renqabs committed Apr 6, 2024
1 parent ffb90d7 commit f1906be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions src/lib/bots/bing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const getOptionSets = (conversationStyle: BingConversationStyle, allowSeach = tr
'h3imaginative',
'clgalileo',
'gencontentv3',
'nojbfedge'
],
[BingConversationStyle.Balanced]: [
'deepleo',
Expand All @@ -44,7 +43,6 @@ const getOptionSets = (conversationStyle: BingConversationStyle, allowSeach = tr
'iycapbing',
'galileo',
'saharagenconv5'
'nojbfedge',
],
[BingConversationStyle.Precise]: [
'deepleo',
Expand All @@ -56,7 +54,6 @@ const getOptionSets = (conversationStyle: BingConversationStyle, allowSeach = tr
'h3precise',
'clgalileo',
'gencontentv3',
'nojbfedge',
],
[BingConversationStyle.Base]: [
'deepleo',
Expand Down Expand Up @@ -133,7 +130,7 @@ export class BingWebBot {
}

const argument = {
optionsSets: getOptionSets(conversation.conversationStyle, conversation.allowSearch),
optionsSets: getOptionSets(useBaseSets ? BingConversationStyle.Base : conversation.conversationStyle, conversation.allowSearch),
sliceIds: [],
message,
source: 'cib',
Expand Down Expand Up @@ -166,7 +163,7 @@ export class BingWebBot {
gptId: "copilot",
previousMessages: conversation.context?.length ? [{
author: 'system',
description: conversation.context.replace('[system](#message)','[system](#additional_instructions)'),
description: conversation.context,
contextType: 'WebPage',
messageType: 'Context',
sourceName: '',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/openai/chat/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function parseOpenAIMessage(request: APIRequest) {
prompt,
context,
stream: request.stream,
allowSearch: /Creative|Balanced|Precise/i.test(request.model),
allowSearch: !/Creative|Balanced|Precise/i.test(request.model),
model: /Creative|gpt-?4/i.test(request.model) ? 'Creative' : request.model,
};
}
Expand Down

0 comments on commit f1906be

Please sign in to comment.