Skip to content

Commit

Permalink
Merge pull request #190 from leftfire/main
Browse files Browse the repository at this point in the history
Reintroduce the ChainOption parameter
  • Loading branch information
tmc authored Jul 13, 2023
2 parents 319dfd8 + d33fca1 commit b593b11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chains/retrieval_qa.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func NewRetrievalQAFromLLM(llm llms.LanguageModel, retriever schema.Retriever) R

// Call gets relevant documents from the retriever and gives them to the combine
// documents chain.
func (c RetrievalQA) Call(ctx context.Context, values map[string]any, _ ...ChainCallOption) (map[string]any, error) { //nolint: lll
func (c RetrievalQA) Call(ctx context.Context, values map[string]any, options ...ChainCallOption) (map[string]any, error) { //nolint: lll
query, ok := values[c.InputKey].(string)
if !ok {
return nil, fmt.Errorf("%w: %w", ErrInvalidInputValues, ErrInputValuesWrongType)
Expand All @@ -73,7 +73,7 @@ func (c RetrievalQA) Call(ctx context.Context, values map[string]any, _ ...Chain
result, err := Call(ctx, c.CombineDocumentsChain, map[string]any{
"question": query,
"input_documents": docs,
})
}, options...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit b593b11

Please sign in to comment.