charge

package
v0.0.0-...-b66a3fd Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForConversation

func ForConversation(conversation Conversation) error

func ForTokens

func ForTokens(record *Record) error

Types

type Conversation

type Conversation interface {
	UseModel() string

	RequestId() string

	Stream() bool

	Ask() []string

	Reply() []string
}

type QaType

type QaType string
const ANSWER QaType = "answer"
const QUERY QaType = "query"

type Record

type Record struct {
	QaType    QaType `json:"qaType"`
	ModelId   string `json:"modelId"`
	RequestId string `json:"requestId"`
	Content   string `json:"content"`
}

type Service

type Service struct {
	ChargeServer *config.UpstreamServer
	// contains filtered or unexported fields
}

func (*Service) Init

func (c *Service) Init(serverConfig *config.ServerConfig, multiplexer *mux.ChainMux) error

Init Init 初始化ChargeService服务,并返回错误信息(如果有)

func (*Service) Name

func (c *Service) Name() string

Name func (c Service) Name() string 获取服务名称,实现ChargeService接口的Name方法

Jump to

Keyboard shortcuts

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