mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-30 16:24:24 +00:00
Changed generate_prompt.py (#6644)
Modified regex for Fix: ValueError: Could not parse output
This commit is contained in:
parent
f1e1ac2a01
commit
3364e5818b
@ -18,7 +18,7 @@ These questions should be detailed and be based explicitly on information in the
|
||||
{doc}
|
||||
<End Document>"""
|
||||
output_parser = RegexParser(
|
||||
regex=r"QUESTION: (.*?)\nANSWER: (.*)", output_keys=["query", "answer"]
|
||||
regex=r"QUESTION: (.*?)\n+ANSWER: (.*)", output_keys=["query", "answer"]
|
||||
)
|
||||
PROMPT = PromptTemplate(
|
||||
input_variables=["doc"], template=template, output_parser=output_parser
|
||||
|
Loading…
Reference in New Issue
Block a user