Open aerfafeng opened 2 hours ago
@aerfafeng Hello! I'm here to help you with any bugs, questions, or contributions. Let's work together to tackle this issue.
Yes, the datatype of the id_
parameter should be modified to a string in the llama-index-packs-self-rag
package to fix the validation error in TextNode
. Specifically, you should change the assignment in base.py
from:
node=TextNode(text=paragraph, id_=p_idx),
to:
node=TextNode(text=paragraph, id_=str(p_idx)),
This change ensures that id_
is a string, which is required by the TextNode
class [1][2].
To continue talking to Dosu, mention @dosu.
Feel free to submit a PR!
Bug Description
I was running self-RAG by
llama-index-packs-self-rag
. when I directly use the code it will reportThis is because the code in line 229 in
base.py
of the package:id_
accepts string butp_idx
is a number. It should be modified like this:Version
0.11.11
Steps to Reproduce
The error will be raised when using code like this. It is the simplest way to call this module:
Relevant Logs/Tracbacks
No response