Skip to content

Commit 71e013e

Browse files
Unable to get the status of document node resolved due to leading spaces (#1064)
* Unable to get the status of document node resolved due to leading and trailing spaces * removed trailing leading spaces while creating source node * graph driver connection resolved
1 parent d53ba43 commit 71e013e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

backend/src/document_sources/web_pages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def get_documents_from_web_page(source_url:str):
66
try:
77
pages = WebBaseLoader(source_url, verify_ssl=False).load()
88
try:
9-
file_name = pages[0].metadata['title']
9+
file_name = pages[0].metadata['title'].strip()
1010
if not file_name:
1111
file_name = last_url_segment(source_url)
1212
except:

backend/src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def create_source_node_graph_web_url(graph, model, source_url, source_type):
123123
message = f"Unable to read data for given url : {source_url}"
124124
raise LLMGraphBuilderException(message)
125125
try:
126-
title = pages[0].metadata['title']
126+
title = pages[0].metadata['title'].strip()
127127
if not title:
128128
title = last_url_segment(source_url)
129129
language = pages[0].metadata['language']

backend/src/post_processing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import time
44
from langchain_neo4j import Neo4jGraph
55
import os
6+
from src.graph_query import get_graphDB_driver
67
from src.shared.common_fn import load_embedding_model
78
from langchain_core.output_parsers import JsonOutputParser
89
from langchain_core.prompts import ChatPromptTemplate
@@ -137,7 +138,7 @@ def create_vector_fulltext_indexes(uri, username, password, database):
137138
logging.info("Starting the process of creating full-text indexes.")
138139

139140
try:
140-
driver = GraphDatabase.driver(uri, auth=(username, password), database=database)
141+
driver = get_graphDB_driver(uri, username, password,database)
141142
driver.verify_connectivity()
142143
logging.info("Database connectivity verified.")
143144
except Exception as e:

0 commit comments

Comments
 (0)