mirror of
https://github.com/silenceper/wechat.git
synced 2026-11-16 05:12:03 +08:00
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:
1 parent
0e34286d78
commit
2bc22dc4ae
18 files changed
+1562
-3
No files matched your search
@@ -6,6 +6,8 @@ import (
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/silenceper/wechat/v2/aispeech"
|
||||
aispeechConfig "github.com/silenceper/wechat/v2/aispeech/config"
|
||||
"github.com/silenceper/wechat/v2/cache"
|
||||
"github.com/silenceper/wechat/v2/miniprogram"
|
||||
miniConfig "github.com/silenceper/wechat/v2/miniprogram/config"
|
||||
@@ -84,6 +86,14 @@ func (wc *Wechat) GetWork(cfg *workConfig.Config) *work.Work {
|
||||
return work.NewWork(cfg)
|
||||
}
|
||||
|
||||
// GetAISpeech 获取微信智能对话的实例
|
||||
func (wc *Wechat) GetAISpeech(cfg *aispeechConfig.Config) *aispeech.AISpeech {
|
||||
if cfg.Cache == nil {
|
||||
cfg.Cache = wc.cache
|
||||
}
|
||||
return aispeech.NewAISpeech(cfg)
|
||||
}
|
||||
|
||||
// SetHTTPClient 设置HTTPClient
|
||||
func (wc *Wechat) SetHTTPClient(client *http.Client) {
|
||||
util.DefaultHTTPClient = client
|
||||
|
||||
Reference in new issue
Block a user