Documentation
¶
Index ¶
Constants ¶
View Source
const ( MsgTypeChat = "chat" MsgTypeChunk = "chunk" MsgTypeDone = "done" MsgTypeError = "error" MsgTypePing = "ping" MsgTypePong = "pong" MsgTypeHistory = "history" )
WebSocket message types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatRequest ¶
type ChatResponse ¶
type Config ¶
type Config struct {
Host string `json:"host"`
Port int `json:"port"`
AgentAddr string `json:"agentAddr"`
UIAuthToken string `json:"uiAuthToken"`
}
Config for Gateway
type Gateway ¶
type Gateway struct {
// contains filtered or unexported fields
}
func (*Gateway) HandleWebSocket ¶
func (g *Gateway) HandleWebSocket(w http.ResponseWriter, r *http.Request)
HandleWebSocket handles WebSocket upgrade requests
type GatewayAgentRPC ¶
type GatewayAgentRPC struct {
// contains filtered or unexported fields
}
GatewayAgentRPC implements channels.AgentRPCInterface for gateway-agent communication
type WSChatRequest ¶
type WSChatRequest struct {
Model string `json:"model"`
Messages []rpcproto.Message `json:"messages"`
}
WSChatRequest represents a chat request via WebSocket
type WSChatResponse ¶
type WSChatResponse struct {
Content string `json:"content"`
Finish bool `json:"finish"`
Error string `json:"error,omitempty"`
TotalTokens int `json:"totalTokens,omitempty"`
}
WSChatResponse represents a chat response via WebSocket
type WSMessage ¶
type WSMessage struct {
Type string `json:"type"`
Content json.RawMessage `json:"content,omitempty"`
}
WSMessage represents a WebSocket message
type WebSocketHub ¶
type WebSocketHub struct {
// contains filtered or unexported fields
}
WebSocketHub manages WebSocket connections
func NewWebSocketHub ¶
func NewWebSocketHub(g *Gateway) *WebSocketHub
func (*WebSocketHub) Run ¶
func (h *WebSocketHub) Run()
Directories
¶
| Path | Synopsis |
|---|---|
|
Package channels - Channel adapter system for communication platforms Provides plugin-based channel integration with hot-reload support
|
Package channels - Channel adapter system for communication platforms Provides plugin-based channel integration with hot-reload support |
Click to show internal directories.
Click to hide internal directories.