cloud

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL        = "https://ai.space.opencsg.com"
	DefaultLoginURL       = "" /* 181-byte string literal not displayed */
	DefaultAccessTokenURL = "https://opencsg.com/settings/access-token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientEvent added in v0.9.5

type ClientEvent struct {
	Module    string `json:"m"`
	ID        string `json:"id"`
	Value     string `json:"v"`
	ClientID  string `json:"c_id,omitempty"`
	ClientIP  string `json:"c_ip,omitempty"`
	Extension string `json:"ext,omitempty"`
}

ClientEvent mirrors the OpenCSG /events payload shape.

type ModelTokenLimits

type ModelTokenLimits struct {
	MaxInputTokens int
	MaxTokens      int
}

type Service

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

func NewService

func NewService(baseURL string) *Service

func (*Service) BaseURL

func (s *Service) BaseURL() string

func (*Service) ChatModelTokenLimits

func (s *Service) ChatModelTokenLimits(modelID string) (ModelTokenLimits, bool)

func (*Service) InvalidateChatModels

func (s *Service) InvalidateChatModels()

func (*Service) ListChatModels

func (s *Service) ListChatModels(ctx context.Context) ([]api.ModelInfo, error)

func (*Service) RefreshChatModels

func (s *Service) RefreshChatModels(ctx context.Context) ([]api.ModelInfo, error)

func (*Service) ReportClientEvents added in v0.9.5

func (s *Service) ReportClientEvents(ctx context.Context, events []ClientEvent) error

func (*Service) SetAccessToken

func (s *Service) SetAccessToken(token string)

func (*Service) SetBaseURL

func (s *Service) SetBaseURL(baseURL string)

Jump to

Keyboard shortcuts

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