mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-08 07:11:06 +00:00
feat: add SiliconCloud support
This commit is contained in:
parent
1ef492449d
commit
29f9de7f56
@ -17,6 +17,7 @@ import (
|
||||
"github.com/danielmiessler/fabric/vendors/groc"
|
||||
"github.com/danielmiessler/fabric/vendors/ollama"
|
||||
"github.com/danielmiessler/fabric/vendors/openai"
|
||||
"github.com/danielmiessler/fabric/vendors/siliconcloud"
|
||||
"github.com/danielmiessler/fabric/youtube"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@ -59,7 +60,7 @@ func NewFabricBase(db *db.Db) (ret *Fabric) {
|
||||
"Enter the index the name of your default model")
|
||||
|
||||
ret.VendorsAll.AddVendors(openai.NewClient(), azure.NewClient(), ollama.NewClient(), groc.NewClient(),
|
||||
gemini.NewClient(), anthropic.NewClient())
|
||||
gemini.NewClient(), anthropic.NewClient(), siliconcloud.NewClient())
|
||||
|
||||
return
|
||||
}
|
||||
|
15
vendors/siliconcloud/siliconcloud.go
vendored
Normal file
15
vendors/siliconcloud/siliconcloud.go
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
package siliconcloud
|
||||
|
||||
import (
|
||||
"github.com/danielmiessler/fabric/vendors/openai"
|
||||
)
|
||||
|
||||
func NewClient() (ret *Client) {
|
||||
ret = &Client{}
|
||||
ret.Client = openai.NewClientCompatible("SiliconCloud", "https://api.siliconflow.cn/v1", nil)
|
||||
return
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
*openai.Client
|
||||
}
|
Loading…
Reference in New Issue
Block a user