Unable to find the imports in LlamaIndex even after correct imports as of there latest docs
from llama_index.vector_stores.types import MetadataInfo, VectorStoreInfo
vector_store_info = VectorStoreInfo(
content_info="brief biography of celebrities",
metadata_info=[
MetadataInfo(
name="category",
type="str",
description=(
"Category of the celebrity, one of [Sports, Entertainment,"
" Business, Music]"
),
),
MetadataInfo(
name="country",
type="str",
description=(
"Country of the celebrity, one of [United States, Barbados,"
" Portugal]"
),
),
],
)
Yes, the correct import is from:
llama_index.core.vector_stores.typesWhy the additional
core?Just to clarify, especially for other people who run into
importproblems, the new versions of LlamaIndexv0.10.0and above have been refactored and there are breaking changes.You can find the official migration guide here: https://docs.llamaindex.ai/en/stable/getting_started/v0_10_0_migration/
ServiceContextis nowSettingsIt's also important to note that the
ServiceContexthas been replaced bySettings, and you can also find the migration guide here: https://docs.llamaindex.ai/en/stable/module_guides/supporting_modules/service_context_migration/So if you're on
v0.10.0or above, make sure to go over the latest version of the docs to ensure you have the correct imports (https://docs.llamaindex.ai/en/stable/api_reference/).To check the version installed on your machine, use:
pip show llama-index