Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { ChatGPTClient *chatgpt.ChatGPTClient Tracer trace.Tracer }
Handler holds dependencies for HTTP handlers.
func NewHandler ¶
func NewHandler() *Handler
NewHandler initializes a new HTTP handler with dependencies.
func (*Handler) ChatGPTHandler ¶
func (h *Handler) ChatGPTHandler(w http.ResponseWriter, r *http.Request)
ChatGPTHandler interacts with the ChatGPT API based on the user's prompt.
func (*Handler) WelcomeHandler ¶
func (h *Handler) WelcomeHandler(w http.ResponseWriter, r *http.Request)
WelcomeHandler responds with a welcome message.
Click to show internal directories.
Click to hide internal directories.