-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: prompt_template_resolved.output_variable is NoneType issue #4976
Conversation
Pull Request Test Coverage Report for Build 5086338918
💛 - Coveralls |
is there any concern with this fix? @silvanocerza |
@faaany I can't seem to reproduce the issue as specified in the linked issue, can you provide one please? |
the code snippet for reproduction is as follows: from haystack.nodes.prompt import PromptNode, PromptModel
the_question = "What is the capital of Germany?"
node = PromptNode()
results, _ = node.run(query=the_question)
print(results) And the error log is as follows: Traceback (most recent call last):
File "/localdisk/fanli/project/haystack/my_test.py", line 6, in <module>
results, _ = node.run(query=the_question)
File "/localdisk/fanli/project/haystack/haystack/nodes/prompt/prompt_node.py", line 375, in run
output_variable = self.output_variable or prompt_template_resolved.output_variable or "results"
AttributeError: 'NoneType' object has no attribute 'output_variable'
output_variable = self.output_variable or prompt_template_resolved.output_variable or "results" is that the |
@silvanocerza any update? it has been a while... |
@faaany merged! Sorry but I was at a conference and didn't have time to handle some stuff. :) |
@652994331 please don't ask for support in unrelated PRs. If you're unsure of what you're doing I suggest you read the official Haystack documentation and follow the tutorials. If you want to report a bug open an issue here. If instead you want to ask for some guidance or help I suggest you ask in GitHub discussions or in our community Discord. Thanks. 🙏 |
no problem! thanks so much for the approval! |
Related Issues
prompt_template
oroutput_variable
#4924Proposed Changes:
How did you test it?
Notes for the reviewer
Checklist
fix:
,feat:
,build:
,chore:
,ci:
,docs:
,style:
,refactor:
,perf:
,test:
.