fix gofmt err
This commit is contained in:
parent
c240378200
commit
596e6bb7d7
3 changed files with 1 additions and 17 deletions
|
|
@ -7,17 +7,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
||||||
channels.RegisterFactory("mqtt", func(cfg *config.Config, b *bus.MessageBus) (channels.Channel, error) {
|
channels.RegisterFactory("mqtt", func(cfg *config.Config, b *bus.MessageBus) (channels.Channel, error) {
|
||||||
|
|
||||||
if !cfg.Channels.MQTT.Enabled {
|
if !cfg.Channels.MQTT.Enabled {
|
||||||
|
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewMQTTChannel(cfg.Channels.MQTT, b)
|
return NewMQTTChannel(cfg.Channels.MQTT, b)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
mqtt "github.com/eclipse/paho.mqtt.golang"
|
mqtt "github.com/eclipse/paho.mqtt.golang"
|
||||||
|
|
||||||
"github.com/sipeed/picoclaw/pkg/bus"
|
"github.com/sipeed/picoclaw/pkg/bus"
|
||||||
"github.com/sipeed/picoclaw/pkg/channels"
|
"github.com/sipeed/picoclaw/pkg/channels"
|
||||||
"github.com/sipeed/picoclaw/pkg/config"
|
"github.com/sipeed/picoclaw/pkg/config"
|
||||||
|
|
|
||||||
|
|
@ -75,27 +75,17 @@ type startupBlockedProvider struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *startupBlockedProvider) Chat(
|
func (p *startupBlockedProvider) Chat(
|
||||||
|
|
||||||
_ context.Context,
|
_ context.Context,
|
||||||
|
|
||||||
_ []providers.Message,
|
_ []providers.Message,
|
||||||
|
|
||||||
_ []providers.ToolDefinition,
|
_ []providers.ToolDefinition,
|
||||||
|
|
||||||
_ string,
|
_ string,
|
||||||
|
|
||||||
_ map[string]any,
|
_ map[string]any,
|
||||||
|
|
||||||
) (*providers.LLMResponse, error) {
|
) (*providers.LLMResponse, error) {
|
||||||
|
|
||||||
return nil, fmt.Errorf("%s", p.reason)
|
return nil, fmt.Errorf("%s", p.reason)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *startupBlockedProvider) GetDefaultModel() string {
|
func (p *startupBlockedProvider) GetDefaultModel() string {
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run starts the gateway runtime using the configuration loaded from configPath.
|
// Run starts the gateway runtime using the configuration loaded from configPath.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue