mirror of
https://github.com/voideditor/void
synced 2026-05-23 17:38:23 +00:00
sys
This commit is contained in:
parent
ac6b5601ef
commit
29f004a826
1 changed files with 8 additions and 8 deletions
|
|
@ -250,8 +250,8 @@ const prepareOpenAIOrAnthropicMessages = ({
|
|||
reservedOutputTokenSpace,
|
||||
}: {
|
||||
messages: SimpleLLMMessage[],
|
||||
systemMessage: string | undefined,
|
||||
aiInstructions: string | undefined,
|
||||
systemMessage: string,
|
||||
aiInstructions: string,
|
||||
supportsSystemMessage: false | 'system-role' | 'developer-role' | 'separated',
|
||||
specialToolFormat: 'openai-style' | 'anthropic-style' | undefined,
|
||||
supportsAnthropicReasoning: boolean,
|
||||
|
|
@ -491,8 +491,8 @@ const prepareGeminiMessages = (messages: AnthropicLLMChatMessage[]) => {
|
|||
|
||||
const prepareMessages = (params: {
|
||||
messages: SimpleLLMMessage[],
|
||||
systemMessage: string | undefined,
|
||||
aiInstructions: string | undefined,
|
||||
systemMessage: string,
|
||||
aiInstructions: string,
|
||||
supportsSystemMessage: false | 'system-role' | 'developer-role' | 'separated',
|
||||
specialToolFormat: 'openai-style' | 'anthropic-style' | 'gemini-style' | undefined,
|
||||
supportsAnthropicReasoning: boolean,
|
||||
|
|
@ -674,21 +674,21 @@ class ConvertToLLMMessageService extends Disposable implements IConvertToLLMMess
|
|||
supportsSystemMessage,
|
||||
} = getModelCapabilities(providerName, modelName, overridesOfModel)
|
||||
|
||||
const systemMessageFromGenerator = await this._generateChatMessagesSystemMessage(chatMode, specialToolFormat)
|
||||
const { disableSystemMessage } = this.voidSettingsService.state.globalSettings;
|
||||
const fullSystemMessage = await this._generateChatMessagesSystemMessage(chatMode, specialToolFormat)
|
||||
const systemMessage = disableSystemMessage ? '' : fullSystemMessage;
|
||||
|
||||
const modelSelectionOptions = this.voidSettingsService.state.optionsOfModelSelection['Chat'][modelSelection.providerName]?.[modelSelection.modelName]
|
||||
|
||||
// Get combined AI instructions
|
||||
const aiInstructions = this._getCombinedAIInstructions();
|
||||
const globalDisableSystemMessageSetting = this.voidSettingsService.state.globalSettings.disableSystemMessage;
|
||||
const finalSystemMessageForPrepareMessages = globalDisableSystemMessageSetting ? undefined : systemMessageFromGenerator;
|
||||
const isReasoningEnabled = getIsReasoningEnabledState('Chat', providerName, modelName, modelSelectionOptions, overridesOfModel)
|
||||
const reservedOutputTokenSpace = getReservedOutputTokenSpace(providerName, modelName, { isReasoningEnabled, overridesOfModel })
|
||||
const llmMessages = this._chatMessagesToSimpleMessages(chatMessages)
|
||||
|
||||
const { messages, separateSystemMessage } = prepareMessages({
|
||||
messages: llmMessages,
|
||||
systemMessage: finalSystemMessageForPrepareMessages,
|
||||
systemMessage,
|
||||
aiInstructions,
|
||||
supportsSystemMessage,
|
||||
specialToolFormat,
|
||||
|
|
|
|||
Loading…
Reference in a new issue