diff --git a/pkg/channels/telegram/telegram.go b/pkg/channels/telegram/telegram.go index 4daace52a..fcd068e6f 100644 --- a/pkg/channels/telegram/telegram.go +++ b/pkg/channels/telegram/telegram.go @@ -3,12 +3,12 @@ package telegram import ( "context" "fmt" + "math/rand" "net/http" "net/url" "os" "regexp" "slices" - "math/rand" "strconv" "strings" "sync" diff --git a/pkg/providers/anthropic/provider.go b/pkg/providers/anthropic/provider.go index bb89cb3f9..1b250b9b4 100644 --- a/pkg/providers/anthropic/provider.go +++ b/pkg/providers/anthropic/provider.go @@ -9,6 +9,7 @@ import ( "github.com/anthropics/anthropic-sdk-go" "github.com/anthropics/anthropic-sdk-go/option" + "github.com/sipeed/picoclaw/pkg/providers/protocoltypes" ) diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index 44c177759..241cc8c5b 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -103,7 +103,9 @@ func NewProviderWithMaxTokensFieldAndTimeout( } // buildRequestBody constructs the common request body for Chat and ChatStream. -func (p *Provider) buildRequestBody(messages []Message, tools []ToolDefinition, model string, options map[string]any) map[string]any { +func (p *Provider) buildRequestBody( + messages []Message, tools []ToolDefinition, model string, options map[string]any, +) map[string]any { model = normalizeModel(model, p.apiBase) requestBody := map[string]any{