chat

package
v0.0.121 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebsocketMessageType = map[int]string{
	websocket.BinaryMessage: "binary",
	websocket.TextMessage:   "text",
	websocket.CloseMessage:  "close",
	websocket.PingMessage:   "ping",
	websocket.PongMessage:   "pong",
}

Functions

func AnyQuestion added in v0.0.26

func AnyQuestion(c *gin.Context)

func AnySelection added in v0.0.36

func AnySelection(c *gin.Context)

func Cron added in v0.0.9

func Cron(c *gin.Context)

func Describe added in v0.0.12

func Describe(c *gin.Context)

Describe TODO 改为不要传Describe内容,比较大,传个名称过来,从后台Describe一下即可

func Event added in v0.0.8

func Event(c *gin.Context)

func Example added in v0.0.18

func Example(c *gin.Context)

func FieldExample added in v0.0.21

func FieldExample(c *gin.Context)

func GPTShell added in v0.0.36

func GPTShell(c *gin.Context)

GPTShell 通过 WebSocket 提供与 ChatGPT 及工具集成的交互式对话终端。

该函数升级 HTTP 连接为 WebSocket,维持心跳检测,实现双向消息流转: - 前端发送消息后,调用 ChatGPT 并动态集成可用工具,支持流式响应和工具调用结果返回; - 后端将 AI 回复和工具执行结果实时推送给前端; - 自动处理连接异常、心跳超时和资源释放。

若 AI 服务未启用或参数绑定失败,将返回相应错误信息。

func History added in v0.0.108

func History(c *gin.Context)

func K8sGPTResource added in v0.0.56

func K8sGPTResource(c *gin.Context)

func Log added in v0.0.8

func Log(c *gin.Context)

func Reset added in v0.0.108

func Reset(c *gin.Context)

func Resource added in v0.0.15

func Resource(c *gin.Context)

Types

type ResourceData added in v0.0.19

type ResourceData struct {
	// 资源版本
	Version string `form:"version"`
	// 资源类型
	Kind string `form:"kind"`
	// 资源组
	Group string `form:"group"`
	// 资源描述
	Describe string `form:"describe"`
	// 定时任务
	Cron string `form:"cron"`
	// 日志
	Data      string `form:"data"`
	Field     string `form:"field"`
	Name      string `form:"name"`
	Namespace string `form:"namespace"`
	// 事件
	Note                string `form:"note"`
	Source              string `form:"source"`
	Reason              string `form:"reason"`
	ReportingController string `form:"reportingController"`
	Type                string `form:"type"`
	RegardingKind       string `form:"regardingKind"`
	// AnyQuestion 任意提问
	Question string `form:"question"`
}

Jump to

Keyboard shortcuts

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