mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 06:53:59 +00:00
template: Update Vectara templates (#15363)
fixed multi-query template for Vectara added self-query template for Vectara Also added prompt_name parameter to summarization CC @efriis **Twitter handle:** @ofermend
This commit is contained in:
committed by
GitHub
parent
1e29b676d5
commit
ffae98d371
@@ -22,11 +22,14 @@ class SummaryConfig:
|
||||
is_enabled: True if summary is enabled, False otherwise
|
||||
max_results: maximum number of results to summarize
|
||||
response_lang: requested language for the summary
|
||||
prompt_name: name of the prompt to use for summarization
|
||||
(see https://docs.vectara.com/docs/learn/grounded-generation/select-a-summarizer)
|
||||
"""
|
||||
|
||||
is_enabled: bool = False
|
||||
max_results: int = 7
|
||||
response_lang: str = "eng"
|
||||
prompt_name: str = "vectara-summary-ext-v1.2.0"
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -364,6 +367,7 @@ class Vectara(VectorStore):
|
||||
{
|
||||
"maxSummarizedResults": config.summary_config.max_results,
|
||||
"responseLang": config.summary_config.response_lang,
|
||||
"summarizerPromptName": config.summary_config.prompt_name,
|
||||
}
|
||||
]
|
||||
|
||||
@@ -570,6 +574,7 @@ class VectaraRetriever(VectorStoreRetriever):
|
||||
"k": 5,
|
||||
"filter": "",
|
||||
"n_sentence_context": "2",
|
||||
"summary_config": SummaryConfig(),
|
||||
}
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user