feat: add aispeech dialog APIs (#887)

* feat: add aispeech dialog APIs

* test: fix aispeech lint failures

* test: satisfy aispeech interfacer lint
This commit is contained in:
GargantuaX authored and GitHub committed 2026-07-20 14:10:56 +08:00
1 parent 0e34286d78
commit 2bc22dc4ae
18 files changed
+1562 -3

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package config
import "github.com/silenceper/wechat/v2/cache"
const defaultBaseURL = "https://openaiapi.weixin.qq.com"
// Config for 微信智能对话.
type Config struct {
AppID string `json:"app_id"`
Token string `json:"token"`
AESKey string `json:"aes_key"`
Account string `json:"account"`
BaseURL string `json:"base_url"`
Cache cache.Cache
}
// GetBaseURL returns the API base URL.
func (cfg *Config) GetBaseURL() string {
if cfg.BaseURL == "" {
return defaultBaseURL
}
return cfg.BaseURL
}