Find answers from the community

Home
Members
LunarShadow
L
LunarShadow
Offline, last seen 4 months ago
Joined September 25, 2024
Hi, I am trying to experiment with custom nodes.

I tried creating a parent-child relationship like this:

child_node.relationships[NodeRelationship.PARENT] = RelatedNodeInfo(
node_id=parent_node.node_id
)

parent_node.relationships[NodeRelationship.CHILD] = RelatedNodeInfo(
node_id=child_node.node_id
)


But I keep getting the error:

ValueError: Child objects must be a list of RelatedNodeInfo objects.

When I do print(parent_node.child_nodes)

It seems I am missing something. Can someone help me out here? Thanks!

The documentation I used as a reference to write this is here: https://docs.llamaindex.ai/en/stable/module_guides/loading/documents_and_nodes/usage_nodes/

Edit: Can we only connect 1 child node at a time?

Edit 2: Nevermind, I figured it out after looking at the source code. Please ignore
4 comments
L
L
Hey guys, what do you use to host your llamaindex apps/API? AWS?
14 comments
L
W
G
Hello, I have some questions about StorageContext and using 3rd party vector stores (say Weaviate/Redis).

  1. Can StorageContext only keep track of 1 vector store? What if I have more than 1? (just asking to understand this better)
  2. Why might I still want to use StorageContext if I am using a 3rd party vector store?
2 comments
L
W
Hi, I am working with the Weaviate integration. Can you please tell me how to delete an index from the store?

If I am not mistaken, WeaviateVectoreStore creates a Weaviate class in the background (https://github.com/run-llama/llama_index/blob/7b52057b717451a801c583fae7efe4c4ad167455/llama-index-legacy/llama_index/legacy/vector_stores/weaviate_utils.py#L90). If that is true, then we can delete an index like this right?

weaviate_client.schema.delete_class(index_name)

Source: https://weaviate.io/developers/weaviate/manage-data/collections#delete-a-collection

If yes, then can we add it as a delete_index in the WeaviateVectoreStore class on llamaindex? (I can create a prequest)

The redis integration has a function like that here for example: (https://github.com/run-llama/llama_index/blob/7b52057b717451a801c583fae7efe4c4ad167455/llama-index-legacy/llama_index/legacy/vector_stores/redis.py#L219)

(should I have asked this in #🔌integrations instead?)
ps: I just discovered LlamaIndex and Weaviate today 😅 . I'm still trying to wrap all the concepts. So please correct me if I am wrong. But it is very intuitive so far. Thanks for keeping it open source!
2 comments
L
L