Documentation
¶
Index ¶
Constants ¶
View Source
const ( CONTENT_BATCH_SIZE = 150 // characters - smaller for more responsive streaming CONTENT_BATCH_TIME = 100 * time.Millisecond // shorter time for more responsive streaming )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
type ChatRequest ¶
type ChatRequest struct {
Messages []ChatMessage `json:"messages"`
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) GetOpenAIClient ¶
func (*Service) HandleChatStream ¶
func (s *Service) HandleChatStream(w http.ResponseWriter, r *http.Request)
type ToolResult ¶
type WebChatToolHandler ¶
type WebChatToolHandler struct {
// contains filtered or unexported fields
}
WebChatToolHandler handles tool events for the web chat
func NewWebChatToolHandler ¶
func NewWebChatToolHandler(streamWriter *rest.StreamWriter) *WebChatToolHandler
func (*WebChatToolHandler) OnToolCall ¶
func (h *WebChatToolHandler) OnToolCall(toolCall openai.ToolCall) error
func (*WebChatToolHandler) OnToolResult ¶
func (h *WebChatToolHandler) OnToolResult(toolCallID, toolName, result string) error
Click to show internal directories.
Click to hide internal directories.