Revert "update voice system prompt override"
This reverts commit f237aba2a3.
This commit is contained in:
parent
2c33a59da1
commit
5ff3b5a52b
2 changed files with 12 additions and 32 deletions
|
|
@ -81,7 +81,6 @@ type processOptions struct {
|
||||||
ForcedSkills []string // Skills explicitly requested for this message
|
ForcedSkills []string // Skills explicitly requested for this message
|
||||||
SystemPromptOverride string // Override the default system prompt (Used by SubTurns)
|
SystemPromptOverride string // Override the default system prompt (Used by SubTurns)
|
||||||
Media []string // media:// refs from inbound message
|
Media []string // media:// refs from inbound message
|
||||||
IsVoice bool // True if this message comes from an audio/voice call
|
|
||||||
InitialSteeringMessages []providers.Message // Steering messages from refactor/agent
|
InitialSteeringMessages []providers.Message // Steering messages from refactor/agent
|
||||||
DefaultResponse string // Response when LLM returns empty
|
DefaultResponse string // Response when LLM returns empty
|
||||||
EnableSummary bool // Whether to trigger summarization
|
EnableSummary bool // Whether to trigger summarization
|
||||||
|
|
@ -1312,25 +1311,17 @@ func (al *AgentLoop) processMessage(ctx context.Context, msg bus.InboundMessage)
|
||||||
"route_channel": route.Channel,
|
"route_channel": route.Channel,
|
||||||
})
|
})
|
||||||
|
|
||||||
isVoice := msg.Metadata != nil && msg.Metadata["is_voice"] == "true"
|
|
||||||
var systemPromptOverride string
|
|
||||||
if isVoice {
|
|
||||||
systemPromptOverride = "You are a helpful AI assistant. The user is speaking to you over voice chat. Reply in a concise, conversational, and natural oral style suitable for text-to-speech. Get straight to the point. Do not use Markdown, emojis, asterisks, or code blocks."
|
|
||||||
}
|
|
||||||
|
|
||||||
opts := processOptions{
|
opts := processOptions{
|
||||||
SessionKey: sessionKey,
|
SessionKey: sessionKey,
|
||||||
Channel: msg.Channel,
|
Channel: msg.Channel,
|
||||||
ChatID: msg.ChatID,
|
ChatID: msg.ChatID,
|
||||||
SenderID: msg.SenderID,
|
SenderID: msg.SenderID,
|
||||||
SenderDisplayName: msg.Sender.DisplayName,
|
SenderDisplayName: msg.Sender.DisplayName,
|
||||||
UserMessage: msg.Content,
|
UserMessage: msg.Content,
|
||||||
SystemPromptOverride: systemPromptOverride,
|
Media: msg.Media,
|
||||||
Media: msg.Media,
|
DefaultResponse: defaultResponse,
|
||||||
IsVoice: isVoice,
|
EnableSummary: true,
|
||||||
DefaultResponse: defaultResponse,
|
SendResponse: false,
|
||||||
EnableSummary: true,
|
|
||||||
SendResponse: false,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// context-dependent commands check their own Runtime fields and report
|
// context-dependent commands check their own Runtime fields and report
|
||||||
|
|
@ -1649,10 +1640,7 @@ func (al *AgentLoop) runTurn(ctx context.Context, ts *turnState) (turnResult, er
|
||||||
messages = resolveMediaRefs(messages, al.mediaStore, maxMediaSize)
|
messages = resolveMediaRefs(messages, al.mediaStore, maxMediaSize)
|
||||||
|
|
||||||
if !ts.opts.NoHistory {
|
if !ts.opts.NoHistory {
|
||||||
var toolDefs []providers.ToolDefinition
|
toolDefs := ts.agent.Tools.ToProviderDefs()
|
||||||
if !ts.opts.IsVoice {
|
|
||||||
toolDefs = ts.agent.Tools.ToProviderDefs()
|
|
||||||
}
|
|
||||||
if isOverContextBudget(ts.agent.ContextWindow, messages, toolDefs, ts.agent.MaxTokens) {
|
if isOverContextBudget(ts.agent.ContextWindow, messages, toolDefs, ts.agent.MaxTokens) {
|
||||||
logger.WarnCF("agent", "Proactive compression: context budget exceeded before LLM call",
|
logger.WarnCF("agent", "Proactive compression: context budget exceeded before LLM call",
|
||||||
map[string]any{"session_key": ts.sessionKey})
|
map[string]any{"session_key": ts.sessionKey})
|
||||||
|
|
@ -1792,10 +1780,7 @@ turnLoop:
|
||||||
})
|
})
|
||||||
|
|
||||||
gracefulTerminal, _ := ts.gracefulInterruptRequested()
|
gracefulTerminal, _ := ts.gracefulInterruptRequested()
|
||||||
var providerToolDefs []providers.ToolDefinition
|
providerToolDefs := ts.agent.Tools.ToProviderDefs()
|
||||||
if !ts.opts.IsVoice {
|
|
||||||
providerToolDefs = ts.agent.Tools.ToProviderDefs()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Native web search support (from HEAD)
|
// Native web search support (from HEAD)
|
||||||
_, hasWebSearch := ts.agent.Tools.Get("web_search")
|
_, hasWebSearch := ts.agent.Tools.Get("web_search")
|
||||||
|
|
|
||||||
|
|
@ -65,8 +65,3 @@ func DerefStr(s *string, fallback string) string {
|
||||||
}
|
}
|
||||||
return *s
|
return *s
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsTruncationDisabled returns whether truncation is disabled globally
|
|
||||||
func IsTruncationDisabled() bool {
|
|
||||||
return disableTruncation.Load()
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue