types

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseConfig

type DatabaseConfig struct {
	DSN         string `` /* 138-byte string literal not displayed */
	AutoMigrate string `usage:"Auto migrate database" default:"true" env:"KNOW_AUTO_MIGRATE"`
}

type Dataset

type Dataset struct {
	// Dataset ID - must be a valid RFC 1123 hostname
	ID             string `json:"id" format:"hostname_rfc1123" binding:"required" example:"asst-12345"`
	EmbedDimension *int   `json:"embed_dim" example:"1536" default:"1536" swaggertype:"integer"`
}

Dataset represents a new knowledge vector space

type Ingest

type Ingest struct {
	Filename     *string             `json:"filename" `
	Content      string              `json:"content" binding:"required,base64"`
	FileMetadata *index.FileMetadata `json:"metadata"`
}

Ingest represents incoming content that should be ingested

type IngestResponse

type IngestResponse struct {
	Documents []string `json:"documents"`
}

type OpenAIConfig

type OpenAIConfig struct {
	APIBase        string `usage:"OpenAI API base" default:"https://api.openai.com/v1" env:"OPENAI_BASE_URL"` // clicky-chats
	APIKey         string `usage:"OpenAI API key (not required if used with clicky-chats)" default:"sk-foo" env:"OPENAI_API_KEY"`
	EmbeddingModel string `usage:"OpenAI Embedding model" default:"text-embedding-ada-002" env:"OPENAI_EMBEDDING_MODEL"`
}

type Query

type Query struct {
	Prompt string `json:"prompt" binding:"required"`
	TopK   *int   `json:"topk" example:"5" swaggertype:"integer"`
}

Query represents an incoming user query

type VectorDBConfig

type VectorDBConfig struct {
	VectorDBPath string `` /* 139-byte string literal not displayed */
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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