Find answers from the community

Home
Members
sonoken000
s
sonoken000
Offline, last seen 3 months ago
Joined September 25, 2024
I'm trying to execute the sample code in https://docs.llamaindex.ai/en/stable/examples/multi_modal/gpt4v_multi_modal_retrieval.html and facing the following error. Can you think of anything that might have caused it?

​query_engine = index.as_query_engine(
multi_modal_llm=openai_mm_llm, text_qa_template=qa_tmpl
)

---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
Cell In[34], line 1
----> 1 query_engine = index.as_query_engine(
2 multi_modal_llm=openai_mm_llm, text_qa_template=qa_tmpl
3 )

File ~/.cache/pypoetry/virtualenvs/llama-index-gTaTDIvJ-py3.8/lib/python3.8/site-packages/llama_index/core/indices/multi_modal/base.py:155, in MultiModalVectorStoreIndex.as_query_engine(self, llm, kwargs) 152 retriever = cast(MultiModalVectorIndexRetriever, self.as_retriever(kwargs))
154 llm = llm or llm_from_settings_or_context(Settings, self._service_context)
--> 155 assert isinstance(llm, MultiModalLLM)
157 return SimpleMultiModalQueryEngine(
158 retriever,
159 multi_modal_llm=llm,
160 **kwargs,
161 )

AssertionError:
5 comments
s
L