Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { // Retriever used to retrieve the relevant documents. Retriever llm.Retriever // The chain the documents and query is given to. CombineDocumentsChain llm.Chain // The input key to get the query from, by default "query". InputKey string // If the chain should return the documents used by the combine // documents chain in the "source_documents" key. ReturnSourceDocuments bool }
func New ¶
New creates a new Chain from a retriever and a chain for combining documents. The chain for combining documents is expected to have the expected input values for the "question" and "input_documents" key.
func (Chain) Call ¶
func (c Chain) Call(ctx context.Context, values map[string]any, options ...llm.ChainOption) (map[string]any, error)
Call gets relevant documents from the retriever and gives them to the combine documents chain.
func (Chain) OutputKeys ¶
Click to show internal directories.
Click to hide internal directories.