server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

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

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"
)

Jump to

Keyboard shortcuts

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