mirror of
https://github.com/zhengkai/orca.git
synced 2026-03-01 00:35:36 +08:00
feat: vertexai
This commit is contained in:
23
server/src/vertexai/init.go
Normal file
23
server/src/vertexai/init.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package vertexai
|
||||
|
||||
import (
|
||||
"project/util"
|
||||
"project/zj"
|
||||
|
||||
aiplatform "cloud.google.com/go/aiplatform/apiv1"
|
||||
"github.com/zhengkai/life-go"
|
||||
"google.golang.org/api/option"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
var err error
|
||||
chatClient, err = aiplatform.NewPredictionClient(
|
||||
life.CTX,
|
||||
option.WithEndpoint(`us-central1-aiplatform.googleapis.com:443`),
|
||||
option.WithCredentialsFile(util.Static(`aigc-llm-730bb179e13c.json`)),
|
||||
)
|
||||
if err != nil {
|
||||
zj.W(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user