diff --git a/pkg/providers/openai/openaiclient.go b/pkg/providers/openai/openaiclient.go index 9360363f..a69bae56 100644 --- a/pkg/providers/openai/openaiclient.go +++ b/pkg/providers/openai/openaiclient.go @@ -9,7 +9,7 @@ import ( "gopkg.in/yaml.v2" "os" - "Glide/pkg/providers" + //"Glide/pkg/providers" "github.com/cloudwego/hertz/pkg/app/client" "github.com/cloudwego/hertz/pkg/protocol" @@ -32,6 +32,25 @@ const ( APITypeAzureAD APIType = "AZURE_AD" ) +type GatewayConfig struct { + Pools []Pool `yaml:"pools"` +} + +type Pool struct { + Name string `yaml:"name"` + Balancing string `yaml:"balancing"` + Providers []Provider `yaml:"providers"` +} + +type Provider struct { + Name string `yaml:"name"` + Provider string `yaml:"provider"` + Model string `yaml:"model"` + APIKey string `yaml:"api_key"` + TimeoutMs int `yaml:"timeout_ms,omitempty"` + DefaultParams map[string]interface{} `yaml:"default_params,omitempty"` +} + // Client is a client for the OpenAI API. type Client struct { apiKey string diff --git a/pkg/providers/types.go b/pkg/providers/types.go index 456b95e3..0143294c 100644 --- a/pkg/providers/types.go +++ b/pkg/providers/types.go @@ -1,4 +1,4 @@ -package providers +package provider type GatewayConfig struct { Pools []Pool `yaml:"pools"` }