ctrl

package
v0.0.0-...-227a544 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParamInt

func GetParamInt(request *http.Request, key string) int

读取http表单参数, 返回int类型

func GetParamInt64

func GetParamInt64(request *http.Request, key string) int64

读取http表单参数, 返回int64类型

func GetParamInt64D

func GetParamInt64D(request *http.Request, key string, defaultVal int64) int64

读取http表单参数, 返回int64类型

func GetParamIntD

func GetParamIntD(request *http.Request, key string, defaultVal int) int

读取http表单参数, 返回int类型

func GetParamString

func GetParamString(request *http.Request, key string) string

读取http表单参数, 返回string类型

func GetParamStringD

func GetParamStringD(request *http.Request, key string, defaultVal string) string

读取http表单参数, 返回string类型

Types

type Ctrl

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

func NewController

func NewController(fileServcie service.FileService, txAsrService service.TxAsrService,
	txTtxService service.TxTtsService, chatService service.ChatService) *Ctrl

func (*Ctrl) Audio2text

func (c *Ctrl) Audio2text(w http.ResponseWriter, r *http.Request)

func (*Ctrl) Chat

func (c *Ctrl) Chat(w http.ResponseWriter, r *http.Request)

聊天接口

func (*Ctrl) HandleDownload

func (c *Ctrl) HandleDownload(w http.ResponseWriter, r *http.Request)

func (*Ctrl) Text2audio

func (c *Ctrl) Text2audio(w http.ResponseWriter, r *http.Request)

文本转语音

type Ctrl2

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

func NewController2

func NewController2(fileServcie service.FileService, txAsrService service.TxAsrService,
	txTtxService service.TxTtsService, chatService service.ChatService) *Ctrl2

func (*Ctrl2) Audio2text

func (c *Ctrl2) Audio2text(w http.ResponseWriter, r *http.Request)

音频转文本接口

func (*Ctrl2) Chat

func (c *Ctrl2) Chat(w http.ResponseWriter, r *http.Request)

聊天接口

func (*Ctrl2) OutputJson

func (c *Ctrl2) OutputJson(w http.ResponseWriter, resp interface{})

func (*Ctrl2) Text2audio

func (c *Ctrl2) Text2audio(w http.ResponseWriter, r *http.Request)

文本转音频接口

Jump to

Keyboard shortcuts

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