handler

package
v0.0.0-...-22e11d3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Info aws_s3.Info
)

Functions

func Do2wb

func Do2wb(ctx *gin.Context)

func DownLoadFile

func DownLoadFile(ctx *gin.Context)

func HelloWorld

func HelloWorld(ctx *gin.Context)

func HelloWorldPost

func HelloWorldPost(ctx *gin.Context)

Types

type Choice

type Choice struct {
	Index        int      `json:"index" gorm:"column:database"`
	FinishReason string   `json:"finish_reason" gorm:"column:database"`
	Msgs         MsgsUser `json:"message" gorm:"column:database"`
}

type MsgsUser

type MsgsUser struct {
	Role    string `json:"role" gorm:"column:role" length:"4"`
	Content string `json:"content" gorm:"column:content"`
}

type MyRequest

type MyRequest struct {
}

myapi

type MyResponse

type MyResponse struct {
	Code int      `json:"statu" gorm:"column:statu"` //0:接收成功,-1:接收失败
	Msg  string   `json:"msg" gorm:"column:msg"`
	Data RespBody `json:"data" gorm:"column:data"` //openai 返回的内容
}

type RequestBody

type RequestBody struct {
	Messages         []MsgsUser `json:"messages" gorm:"column:messages"`
	MaxTokens        int        `json:"max_tokens" gorm:"column:max_tokens"`
	Temperature      float32    `json:"temperature" gorm:"column:temperature"`
	FrequencyPenalty int        `json:"frequency_penalty" gorm:"column:frequency_penalty"`
	PresencePenalty  int        `json:"presence_penalty" gorm:"column:presence_penalty"`
	TopP             float32    `json:"top_p" gorm:"column:top_p"`
	Stop             []string   `json:"stop" gorm:"column:stop"`
}

type RespBody

type RespBody struct {
	Id      string   `json:"id" gorm:"column:id"`
	Object  string   `json:"object" gorm:"column:object"`
	Created int64    `json:"created" gorm:"column:created"`
	Model   string   `json:"model" gorm:"column:model"`
	Choices []Choice `json:"choices" gorm:"column:choices"`
	UsAge   Usage    `json:"usage" gorm:"column:usage"`
}

响应

type Usage

type Usage struct {
	CompletionTokens int `json:"completion_tokens" gorm:"column:completion_tokens"`
	PromptTokens     int `json:"prompt_tokens" gorm:"column:prompt_tokens"`
	TotalTokens      int `json:"total_tokens" gorm:"column:total_tokens"`
}

Jump to

Keyboard shortcuts

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