griptape
griptape copied to clipboard
prompt_task.py prompt_stack should check weather self.structure is None
- [x] I have read and agree to the contributing guidelines.
Describe the bug If use prompt_task without a structure, access to self.structure might raise None exception.
To Reproduce A minimal, reproducible code example.
text_artifact = TextArtifact(
"Respond to the user's following question 'who are you' in the language '{{preferred_language}}' and tone '{{tone}}'."
)
prompt_task = PromptTask(
text_artifact,
context={"preferred_language": "ENGLISH", "tone": "PLAYFUL"},
)
print(prompt_task.prompt_stack.to_json())