Documentation
¶
Index ¶
- type DBChain
- func (c *DBChain) Answer(ctx context.Context, question string) (string, error)
- func (c *DBChain) Call(ctx context.Context, values map[string]any, options ...chains.ChainCallOption) (map[string]any, error)
- func (c *DBChain) Close() error
- func (c *DBChain) GetInputKeys() []string
- func (c *DBChain) GetMemory() schema.Memory
- func (c *DBChain) GetOutputKeys() []string
- func (c *DBChain) Run(ctx context.Context, query string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBChain ¶
type DBChain struct {
SQLChain *chains.SQLDatabaseChain
// contains filtered or unexported fields
}
func New ¶
New returns a new TableChain. useAllTables: user all tables or choose by query If you have a lot of tables, you'd better filter out the tables by useAllTables=false, otherwise, the token may execeded token limit .
func (*DBChain) GetInputKeys ¶
GetInputKeys returns the expected input keys.
func (*DBChain) GetOutputKeys ¶
GetOutputKeys returns the output keys the chain will return.
Click to show internal directories.
Click to hide internal directories.