mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-19 21:33:51 +00:00
Fix default refine prompt template bug (#10928)
**Description:** Default refine template does not actually use the refine template defined above, it uses a string with the variable name. @baskaryan, @eyurtsev, @hwchase17
This commit is contained in:
parent
cab55e9bc1
commit
3d40de75c5
@ -33,7 +33,7 @@ refine_template = (
|
|||||||
"If the context isn't useful, return the original answer."
|
"If the context isn't useful, return the original answer."
|
||||||
)
|
)
|
||||||
CHAT_REFINE_PROMPT = ChatPromptTemplate.from_messages(
|
CHAT_REFINE_PROMPT = ChatPromptTemplate.from_messages(
|
||||||
[("human", "{question}"), ("ai", "{existing_answer}"), ("human", "refine_template")]
|
[("human", "{question}"), ("ai", "{existing_answer}"), ("human", refine_template)]
|
||||||
)
|
)
|
||||||
REFINE_PROMPT_SELECTOR = ConditionalPromptSelector(
|
REFINE_PROMPT_SELECTOR = ConditionalPromptSelector(
|
||||||
default_prompt=DEFAULT_REFINE_PROMPT,
|
default_prompt=DEFAULT_REFINE_PROMPT,
|
||||||
|
Loading…
Reference in New Issue
Block a user