Closed jm-nab closed 3 months ago
@jm-nab thanks for opening this issue! Are you able to provide a minimal reproducible example that shows how your input is raising an ErrorArtifact
? This context will help us figure out the best path forward here.
I've been able to find where the error is being rehydrated out of the conversation memory.
I believe what happened was I had set a breakpoint(), and I "ctrl+c" out of it, and it might have caused a race condition, error exception of some kind that got placed on to the memory.
(Pdb) for x in memory.runs:print(type(x.output))
<class 'griptape.artifacts.text_artifact.TextArtifact'>
<class 'griptape.artifacts.text_artifact.TextArtifact'>
<class 'griptape.artifacts.text_artifact.TextArtifact'>
<class 'griptape.artifacts.error_artifact.ErrorArtifact'>
(Pdb) memory.runs[-1].input.value
'Analyze the given task and provide a comprehensive response based on your expertise. \n Use the appropriate RAG tool for internal documentation queries when necessary. \n If the task involves coding, provide well-commented code snippets. \n If it\'s a research question, provide detailed and accurate information. \n Suggested collection: ```json\n{\n "collection": "confluence-ITENG"\n}\n```\n Task: How can I get a docker container deployed for my app in AWS?'
(Pdb) type(memory.runs[-1].output)
<class 'griptape.artifacts.error_artifact.ErrorArtifact'>
(Pdb) memory.runs[-1].output
ErrorArtifact(type='ErrorArtifact', id='e067ec4c5c014d79aa813c148e23f413', reference=None, meta={}, name='e067ec4c5c014d79aa813c148e23f413', value='', exception=None)
(Pdb) where
<frozen runpy>(198)_run_module_as_main()
<frozen runpy>(88)_run_code()
/home/jm/repos/test/vertexai_loaders/src/vertexai_loaders/drivers/mixture_of_experts.py(515)<module>()
-> result = get_experts(query, conversation_id=start + idx)
/home/jm/repos/test/vertexai_loaders/src/vertexai_loaders/drivers/mixture_of_experts.py(298)get_experts()
-> workflow = Workflow(
<attrs generated init griptape.structures.workflow.Workflow>(35)__init__()
-> _setattr('conversation_memory', __attr_factory_conversation_memory(self))
/home/jm/repos/test/vertexai_loaders/venv_311/lib/python3.11/site-packages/griptape/structures/structure.py(56)<lambda>()
-> lambda self: ConversationMemory(driver=self.config.conversation_memory_driver), takes_self=True
<attrs generated init griptape.memory.structure.conversation_memory.ConversationMemory>(14)__init__()
-> self.__attrs_post_init__()
> /home/jm/repos/test/vertexai_loaders/venv_311/lib/python3.11/site-packages/griptape/memory/structure/base_conversation_memory.py(27)__attrs_post_init__()
-> if memory is not None:
Whatever is raising and adding the error artifact to the conversation memory doesn't seem to exception information, it might be in a custom class that I have written, and neglected to do the exception raising properly?
From the memory:
ErrorArtifact(type='ErrorArtifact', id='e067ec4c5c014d79aa813c148e23f413', reference=None, meta={}, name='e067ec4c5c014d79aa813c148e23f413', value='', exception=None)
Is your feature request related to a problem? Please describe.
When run.input generates an ErrorArtifact, the prompt stack throws a misdirecting error:
Describe the solution you'd like
When a run generates an ErrorArtifact, surfacing the reason for the error would help. I tried setting a pdb.set_trace, and the ErrorArtifact had an empty .value and .exception
Describe alternatives you've considered
Additional context
Notes:
conversation_id
used seemed to work