mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-18 17:51:28 +00:00
chore: move config key to package ctxkey
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/songquanpeng/one-api/common/config"
|
||||
"github.com/songquanpeng/one-api/common/ctxkey"
|
||||
"io"
|
||||
"net/http"
|
||||
@@ -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