@@ -27,11 +27,11 @@ class RAGNode(BaseNode):
2727 node_type (str): The type of the node, set to "node" indicating a standard operational node.
2828
2929 Args:
30- node_name (str, optional): The unique identifier name for the node.
30+ node_name (str, optional): The unique identifier name for the node.
3131 Defaults to "ParseHTMLNode".
3232
3333 Methods:
34- execute(state): Parses the HTML document contained within the state using
34+ execute(state): Parses the HTML document contained within the state using
3535 the specified tags, if provided, and updates the state with the parsed content.
3636 """
3737
@@ -45,7 +45,7 @@ def __init__(self, input: str, output: List[str], node_config: dict, node_name:
4545
4646 def execute (self , state ):
4747 """
48- Executes the node's logic to implement RAG (Retrieval-Augmented Generation)
48+ Executes the node's logic to implement RAG (Retrieval-Augmented Generation)
4949 The method updates the state with relevant chunks of the document.
5050
5151 Args:
@@ -55,7 +55,7 @@ def execute(self, state):
5555 dict: The updated state containing the 'relevant_chunks' key with the relevant chunks.
5656
5757 Raises:
58- KeyError: If 'document' is not found in the state, indicating that the necessary
58+ KeyError: If 'document' is not found in the state, indicating that the necessary
5959 information for parsing is missing.
6060 """
6161
@@ -93,8 +93,8 @@ def execute(self, state):
9393 embeddings = AzureOpenAIEmbeddings ()
9494 elif isinstance (embedding_model , Ollama ):
9595 embeddings = OllamaEmbeddings (model = embedding_model .model )
96- elif isinstance (embedding_model , Ollama ):
97- embeddings = HuggingFaceHubEmbeddings (embedding_model , HuggingFace )
96+ elif isinstance (embedding_model , HuggingFace ):
97+ embeddings = HuggingFaceHubEmbeddings (model = embedding_model . model )
9898 else :
9999 raise ValueError ("Embedding Model missing or not supported" )
100100
0 commit comments