utils

package
v0.0.0-...-4a3b078 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AwsClientKey = "aws_client"

Variables

This section is empty.

Functions

func AwsClient

func AwsClient(config *AwsConfig) *bedrockruntime.Client

func AwsClientFromMeta

func AwsClientFromMeta(meta *meta.Meta) (*bedrockruntime.Client, error)

func WrapErr

func WrapErr(err error) *relaymodel.ErrorWithStatusCode

Types

type AwsAdapter

type AwsAdapter interface {
	ConvertRequest(meta *meta.Meta, req *http.Request) (string, http.Header, io.Reader, error)
	DoResponse(meta *meta.Meta, c *gin.Context) (usage *model.Usage, err *model.ErrorWithStatusCode)
}

type AwsConfig

type AwsConfig struct {
	Region string
	AK     string
	SK     string
}

func GetAwsConfigFromKey

func GetAwsConfigFromKey(key string) (*AwsConfig, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL