feat: Add DingTalk channel support via Stream Mode
- Add pkg/channels/dingtalk.go with WebSocket Stream Mode - Add DingTalkConfig to config.go - Register DingTalk in manager.go - Update README with DingTalk setup instructions - Add open-dingtalk/dingtalk-stream-sdk-go v0.9.1 dependency
This commit is contained in:
@@ -36,6 +36,7 @@ type ChannelsConfig struct {
|
||||
Feishu FeishuConfig `json:"feishu"`
|
||||
Discord DiscordConfig `json:"discord"`
|
||||
MaixCam MaixCamConfig `json:"maixcam"`
|
||||
DingTalk DingTalkConfig `json:"dingtalk"`
|
||||
}
|
||||
|
||||
type WhatsAppConfig struct {
|
||||
@@ -72,6 +73,13 @@ type MaixCamConfig struct {
|
||||
AllowFrom []string `json:"allow_from" env:"PICOCLAW_CHANNELS_MAIXCAM_ALLOW_FROM"`
|
||||
}
|
||||
|
||||
type DingTalkConfig struct {
|
||||
Enabled bool `json:"enabled" env:"PICOCLAW_CHANNELS_DINGTALK_ENABLED"`
|
||||
ClientID string `json:"client_id" env:"PICOCLAW_CHANNELS_DINGTALK_CLIENT_ID"`
|
||||
ClientSecret string `json:"client_secret" env:"PICOCLAW_CHANNELS_DINGTALK_CLIENT_SECRET"`
|
||||
AllowFrom []string `json:"allow_from" env:"PICOCLAW_CHANNELS_DINGTALK_ALLOW_FROM"`
|
||||
}
|
||||
|
||||
type ProvidersConfig struct {
|
||||
Anthropic ProviderConfig `json:"anthropic"`
|
||||
OpenAI ProviderConfig `json:"openai"`
|
||||
@@ -146,6 +154,12 @@ func DefaultConfig() *Config {
|
||||
Port: 18790,
|
||||
AllowFrom: []string{},
|
||||
},
|
||||
DingTalk: DingTalkConfig{
|
||||
Enabled: false,
|
||||
ClientID: "",
|
||||
ClientSecret: "",
|
||||
AllowFrom: []string{},
|
||||
},
|
||||
},
|
||||
Providers: ProvidersConfig{
|
||||
Anthropic: ProviderConfig{},
|
||||
|
||||
Reference in New Issue
Block a user