Documentation
¶
Index ¶
- type Column
- type EmailRetriever
- type InitChatHistoryTableOptions
- type Option
- func WithCloudSQLInstance(projectID, region, instance string) Option
- func WithDatabase(database string) Option
- func WithIAMAccountEmail(email string) Option
- func WithIPType(ipType string) Option
- func WithPassword(password string) Option
- func WithPool(pool *pgxpool.Pool) Option
- func WithUser(user string) Option
- type OptionInitChatHistoryTable
- type PostgresEngine
- type VectorstoreTableOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitChatHistoryTableOptions ¶
type InitChatHistoryTableOptions struct {
// contains filtered or unexported fields
}
Option type for defining options.
type Option ¶
type Option func(p *engineConfig)
Option is a function type that can be used to modify the Engine.
func WithCloudSQLInstance ¶
WithCloudSQLInstance sets the project, region, and instance fields.
func WithIAMAccountEmail ¶
WithIAMAccountEmail sets the IAMAccountEmail field.
type OptionInitChatHistoryTable ¶
type OptionInitChatHistoryTable func(*InitChatHistoryTableOptions)
Option function type.
func WithSchemaName ¶
func WithSchemaName(schemaName string) OptionInitChatHistoryTable
WithSchemaName sets a custom schema name.
type PostgresEngine ¶
func NewPostgresEngine ¶
func NewPostgresEngine(ctx context.Context, opts ...Option) (PostgresEngine, error)
NewPostgresEngine creates a new PostgresEngine.
func (*PostgresEngine) InitChatHistoryTable ¶
func (p *PostgresEngine) InitChatHistoryTable(ctx context.Context, tableName string, opts ...OptionInitChatHistoryTable) error
initChatHistoryTable creates a table to store chat history.
func (*PostgresEngine) InitVectorstoreTable ¶
func (p *PostgresEngine) InitVectorstoreTable(ctx context.Context, opts VectorstoreTableOptions) error
initVectorstoreTable creates a table for saving of vectors to be used with PostgresVectorStore.
type VectorstoreTableOptions ¶
type VectorstoreTableOptions struct { TableName string VectorSize int SchemaName string ContentColumnName string EmbeddingColumn string MetadataJSONColumn string IDColumn Column MetadataColumns []Column OverwriteExisting bool StoreMetadata bool }
VectorstoreTableOptions is used with the InitVectorstoreTable to use the required and default fields.
Click to show internal directories.
Click to hide internal directories.