Documentation ¶
Index ¶
Constants ¶
View Source
const MAX_FILE_SIZE int64 = 10 << 20 // 10 MB
View Source
const MAX_TOTAL_UPLOAD_SIZE int64 = 10 << 20 // 10 MB
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HandlerContext ¶
type HandlerContext struct {
// contains filtered or unexported fields
}
func NewHandlerContext ¶
func NewHandlerContext(openAIClient *openai.Client, vectorDB vectordb.VectorDB) *HandlerContext
func (*HandlerContext) QuestionHandler ¶
func (ctx *HandlerContext) QuestionHandler(w http.ResponseWriter, r *http.Request)
Handle Requests For Question
func (*HandlerContext) UploadHandler ¶
func (ctx *HandlerContext) UploadHandler(w http.ResponseWriter, r *http.Request)
type OpenAIResponse ¶
type UploadResponse ¶
type UploadResponse struct { Message string `json:"message"` NumFilesSucceeded int `json:"num_files_succeeded"` NumFilesFailed int `json:"num_files_failed"` SuccessfulFileNames []string `json:"successful_file_names"` FailedFileNames map[string]string `json:"failed_file_names"` FilePreviews map[string]string `json:"file_previews"` }
Click to show internal directories.
Click to hide internal directories.