handler

package
v0.0.0-...-a3cc282 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(ctx context.Context) (*Handler, error)

func (*Handler) AgentInit

func (h *Handler) AgentInit(ctx context.Context, c *app.RequestContext)

func (*Handler) AgentRun

func (h *Handler) AgentRun(ctx context.Context, c *app.RequestContext)

func (*Handler) CreateModel

func (h *Handler) CreateModel(ctx context.Context, c *app.RequestContext)

func (*Handler) DeleteModel

func (h *Handler) DeleteModel(ctx context.Context, c *app.RequestContext)

func (*Handler) DeleteSession

func (h *Handler) DeleteSession(ctx context.Context, c *app.RequestContext)

func (*Handler) GetModelList

func (h *Handler) GetModelList(ctx context.Context, c *app.RequestContext)

func (*Handler) GetPrompt

func (h *Handler) GetPrompt(ctx context.Context, c *app.RequestContext)

func (*Handler) GetSessionMessages

func (h *Handler) GetSessionMessages(ctx context.Context, c *app.RequestContext)

func (*Handler) ListSessions

func (h *Handler) ListSessions(ctx context.Context, c *app.RequestContext)

func (*Handler) SavePrompt

func (h *Handler) SavePrompt(ctx context.Context, c *app.RequestContext)

type SSEStream

type SSEStream struct {
	// contains filtered or unexported fields
}

func NewSSEStream

func NewSSEStream(ctx context.Context, w *sse.Writer, sessionID, runID string) *SSEStream

func (*SSEStream) Close

func (s *SSEStream) Close()

func (*SSEStream) SendCustomEvent

func (s *SSEStream) SendCustomEvent(name string, value any) error

func (*SSEStream) SendRunError

func (s *SSEStream) SendRunError(message, code string) error

func (*SSEStream) SendRunFinished

func (s *SSEStream) SendRunFinished() error

func (*SSEStream) SendRunStarted

func (s *SSEStream) SendRunStarted() error

func (*SSEStream) SendTextMessageContent

func (s *SSEStream) SendTextMessageContent(messageID string, role model.MessageRole, delta string, isThinking bool) error

func (*SSEStream) SendTextMessageEnd

func (s *SSEStream) SendTextMessageEnd(messageID string, role model.MessageRole) error

func (*SSEStream) SendTextMessageStart

func (s *SSEStream) SendTextMessageStart(messageID string, role model.MessageRole, name string, isThinking bool) error

func (*SSEStream) SendToolCallArgs

func (s *SSEStream) SendToolCallArgs(toolCallID, toolCallName, delta string) error

func (*SSEStream) SendToolCallEnd

func (s *SSEStream) SendToolCallEnd(toolCallID, toolCallName string, status model.ToolCallStatus) error

func (*SSEStream) SendToolCallResult

func (s *SSEStream) SendToolCallResult(toolCallID, toolCallName, delta string, status model.ToolCallStatus) error

func (*SSEStream) SendToolCallStart

func (s *SSEStream) SendToolCallStart(toolCallID, toolCallName, parentMessageID string) error

Jump to

Keyboard shortcuts

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