mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-11 19:03:43 +08:00
Merge commit '3d149fedf45472eff92910324974c762fc37dad6'
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/Laisky/one-api/common"
|
||||
"github.com/Laisky/one-api/common/config"
|
||||
"github.com/Laisky/one-api/common/ctxkey"
|
||||
"github.com/Laisky/one-api/common/helper"
|
||||
"github.com/Laisky/one-api/common/logger"
|
||||
@@ -25,9 +24,9 @@ import (
|
||||
)
|
||||
|
||||
func newAwsClient(c *gin.Context) (*bedrockruntime.Client, error) {
|
||||
ak := c.GetString(config.KeyAK)
|
||||
sk := c.GetString(config.KeySK)
|
||||
region := c.GetString(config.KeyRegion)
|
||||
ak := c.GetString(ctxkey.ConfigAK)
|
||||
sk := c.GetString(ctxkey.ConfigSK)
|
||||
region := c.GetString(ctxkey.ConfigRegion)
|
||||
client := bedrockruntime.New(bedrockruntime.Options{
|
||||
Region: region,
|
||||
Credentials: aws.NewCredentialsCache(credentials.NewStaticCredentialsProvider(ak, sk, "")),
|
||||
|
||||
Reference in New Issue
Block a user