mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 12:13:46 +08:00
feat: 头条,微博热搜等函数 API 实现
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
package function
|
||||
|
||||
import "chatplus/core/types"
|
||||
|
||||
type Function interface {
|
||||
Invoke(...interface{}) (string, error)
|
||||
Name() string
|
||||
}
|
||||
|
||||
type resVo struct {
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Code types.BizCode `json:"code"`
|
||||
Message string `json:"message"`
|
||||
Data struct {
|
||||
Title string `json:"title"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
Items []dataItem `json:"items"`
|
||||
} `json:"data"`
|
||||
}
|
||||
|
||||
type dataItem struct {
|
||||
Title string `json:"title"`
|
||||
Url string `json:"url"`
|
||||
Remark string `json:"remark"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user