api

package
v0.0.0-...-b1e8dd2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: LGPL-2.1 Imports: 8 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 {
	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.

Jump to

Keyboard shortcuts

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