http

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Status int    `json:"status"`
	Msg    string `json:"msg"`
}

ErrorResponse defines the structure for error responses

type Handler

type Handler interface {
	ChatAPI(c *gin.Context)
	StreamChatAPI(c *gin.Context)
}

func NewHandler

func NewHandler(engine *engine.AgentEngine) Handler

type MessageRequest

type MessageRequest struct {
	Message string `json:"message" binding:"required"`
}

MessageRequest defines the structure for message requests

type SSEvent

type SSEvent struct {
	Type    string      `json:"type"`
	Content string      `json:"content,omitempty"`
	Error   string      `json:"error,omitempty"`
	End     bool        `json:"end,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

SSEvent defines the structure for SSE events

Jump to

Keyboard shortcuts

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