Documentation ¶
Index ¶
- type RouterServer
- func (s *RouterServer) GetChatCompletions(ctx context.Context, body azopenai.ChatCompletionsOptions, ...) (azopenai.GetChatCompletionsResponse, error)
- func (s *RouterServer) GetChatCompletionsStream(ctx context.Context, body azopenai.ChatCompletionsOptions, ...) (azopenai.GetChatCompletionsStreamResponse, error)
- type ServerConfig
- type ServerConfigType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouterServer ¶
type RouterServer struct { ActiveConnections int Latency int64 Type ServerConfigType AvailableModels []string // AvailableModels is a list of models that are available for the Azure endpoint. The list of models will vary based on the endpoint. // contains filtered or unexported fields }
RouterServer represents the server that the router will use to send requests.
func NewRouterServer ¶
func NewRouterServer(serverConfig ServerConfig) (*RouterServer, error)
func (*RouterServer) GetChatCompletions ¶
func (s *RouterServer) GetChatCompletions(ctx context.Context, body azopenai.ChatCompletionsOptions, options *azopenai.GetChatCompletionsOptions) (azopenai.GetChatCompletionsResponse, error)
GetChatCompletions - Gets chat completions for the provided chat messages. Completions support a wide variety of tasks and generate text that continues from or "completes" provided prompt data. If the operation fails it returns an *azcore.ResponseError type.
func (*RouterServer) GetChatCompletionsStream ¶
func (s *RouterServer) GetChatCompletionsStream(ctx context.Context, body azopenai.ChatCompletionsOptions, options *azopenai.GetChatCompletionsStreamOptions) (azopenai.GetChatCompletionsStreamResponse, error)
GetChatCompletionsStream - Return the chat completions for a given prompt as a sequence of events. If the operation fails it returns an *azcore.ResponseError type.
- options - GetCompletionsOptions contains the optional parameters for the Client.GetCompletions method.
type ServerConfig ¶
type ServerConfig struct { Endpoint string ApiKey string Type ServerConfigType AvailableModels []string // AvailableModels is a list of models that are available for the Azure endpoint. The list of models will vary based on the endpoint. }
ServerConfig represents the configuration for the server.
type ServerConfigType ¶
type ServerConfigType string
const ( AzureOpenAiServerType ServerConfigType = "azure-openai" OpenAiServerType ServerConfigType = "openai" )
Click to show internal directories.
Click to hide internal directories.