custom

package
v1.23.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count

func Count(input string) (int, error)

func NewTokenCounter

func NewTokenCounter()

Types

type Provider

type Provider struct {
	Id                  string         `json:"id"`
	CreatedAt           int64          `json:"created_at"`
	UpdatedAt           int64          `json:"updated_at"`
	Provider            string         `json:"provider"`
	RouteConfigs        []*RouteConfig `json:"route_configs"`
	AuthenticationParam string         `json:"authentication_param"`
}

type RouteConfig

type RouteConfig struct {
	Path                             string `json:"path"`
	TargetUrl                        string `json:"target_url"`
	StreamLocation                   string `json:"stream_location"`
	ModelLocation                    string `json:"model_location"`
	RequestPromptLocation            string `json:"request_prompt_location"`
	ResponseCompletionLocation       string `json:"response_completion_location"`
	StreamEndWord                    string `json:"stream_end_word"`
	StreamResponseCompletionLocation string `json:"stream_response_completion_location"`
	StreamMaxEmptyMessages           int    `json:"stream_max_empty_messages"`
}

type UpdateProvider added in v1.3.1

type UpdateProvider struct {
	UpdatedAt           int64          `json:"updated_at"`
	RouteConfigs        []*RouteConfig `json:"route_configs"`
	AuthenticationParam *string        `json:"authentication_param"`
}

Jump to

Keyboard shortcuts

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