server

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: Apache-2.0 Imports: 55 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleHashedSessionID added in v0.11.0

func HandleHashedSessionID(req *http.Request, gatewayClient *client.Client, dispatcher *dispatcher.Dispatcher, hashedSessionID, namespace, name string) error

func NewGatewayTokenReviewer added in v0.8.0

func NewGatewayTokenReviewer(gatewayClient *client.Client, dispatcher *dispatcher.Dispatcher) authenticator.Request

Types

type Options

type Options struct {
	Hostname     string
	UIHostname   string `name:"ui-hostname" env:"OBOT_SERVER_UI_HOSTNAME"`
	GatewayDebug bool

	DailyUserPromptTokenLimit     int `usage:"The maximum number of daily user prompt/input token to allow, <= 0 disables the limit" default:"10000000"`     // default is 10 million
	DailyUserCompletionTokenLimit int `usage:"The maximum number of daily user completion/output tokens to allow, <= 0 disables the limit" default:"100000"` // default is 100 thousand
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, db *db.DB, tokenService *ephemeral.TokenService, modelProviderDispatcher *dispatcher.Dispatcher, opts Options) (*Server, error)

func (*Server) AddRoutes

func (s *Server) AddRoutes(mux *server.Server)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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