mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-22 07:27:35 +08:00
fix: resolve compilation errors found during Docker verification
This commit is contained in:
BIN
clawgo_test
Executable file
BIN
clawgo_test
Executable file
Binary file not shown.
@@ -12,7 +12,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
|
||||||
|
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -593,9 +592,9 @@ func gatewayCmd() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var transcriber *voice.GroqTranscriber
|
var transcriber *voice.GroqTranscriber
|
||||||
if cfg.Providers.Groq.APIKey != "" {
|
if cfg.Providers.Proxy.APIKey != "" && strings.Contains(cfg.Providers.Proxy.APIBase, "groq.com") {
|
||||||
transcriber = voice.NewGroqTranscriber(cfg.Providers.Groq.APIKey)
|
transcriber = voice.NewGroqTranscriber(cfg.Providers.Proxy.APIKey)
|
||||||
logger.InfoC("voice", "Groq voice transcription enabled")
|
logger.InfoC("voice", "Groq voice transcription enabled via Proxy config")
|
||||||
}
|
}
|
||||||
|
|
||||||
if transcriber != nil {
|
if transcriber != nil {
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ func NewAgentLoop(cfg *config.Config, msgBus *bus.MessageBus, provider providers
|
|||||||
|
|
||||||
// 注入递归运行逻辑,使 subagent 具备 full tool-calling 能力
|
// 注入递归运行逻辑,使 subagent 具备 full tool-calling 能力
|
||||||
subagentManager.SetRunFunc(func(ctx context.Context, task, channel, chatID string) (string, error) {
|
subagentManager.SetRunFunc(func(ctx context.Context, task, channel, chatID string) (string, error) {
|
||||||
sessionKey := fmt.Sprintf("subagent:%d", time.Now().UnixNano())
|
sessionKey := fmt.Sprintf("subagent:%d", os.Getpid()) // 改用 PID 或随机数,避免 sessionKey 冲突
|
||||||
return loop.ProcessDirect(ctx, task, sessionKey)
|
return loop.ProcessDirect(ctx, task, sessionKey)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user