Documentation
¶
Index ¶
- Variables
- func AnyQuestion(c *gin.Context)
- func AnySelection(c *gin.Context)
- func Cron(c *gin.Context)
- func Describe(c *gin.Context)
- func Event(c *gin.Context)
- func Example(c *gin.Context)
- func FieldExample(c *gin.Context)
- func GPTShell(c *gin.Context)
- func History(c *gin.Context)
- func K8sGPTResource(c *gin.Context)
- func Log(c *gin.Context)
- func Reset(c *gin.Context)
- func Resource(c *gin.Context)
- type ResourceData
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 AnySelection ¶ added in v0.0.36
func FieldExample ¶ added in v0.0.21
func GPTShell ¶ added in v0.0.36
GPTShell 通过 WebSocket 提供与 ChatGPT 及工具集成的交互式对话终端。
该函数升级 HTTP 连接为 WebSocket,维持心跳检测,实现双向消息流转: - 前端发送消息后,调用 ChatGPT 并动态集成可用工具,支持流式响应和工具调用结果返回; - 后端将 AI 回复和工具执行结果实时推送给前端; - 自动处理连接异常、心跳超时和资源释放。
若 AI 服务未启用或参数绑定失败,将返回相应错误信息。
func K8sGPTResource ¶ added in v0.0.56
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"`
}
Click to show internal directories.
Click to hide internal directories.