Skip to content

Commit b7d2149

Browse files
added error message for doc retriver (#807)
1 parent 3f5303e commit b7d2149

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

backend/score.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ async def post_processing(uri=Form(), userName=Form(), password=Form(), database
296296
logging.info(f'Entity Embeddings created')
297297

298298
if "enable_communities" in tasks:
299-
model = "openai-gpt-4o"
300-
await asyncio.to_thread(create_communities, uri, userName, password, database,model)
299+
await asyncio.to_thread(create_communities, uri, userName, password, database)
301300
josn_obj = {'api_name': 'post_processing/create_communities', 'db_url': uri, 'logging_time': formatted_time(datetime.now(timezone.utc))}
302301
logging.info(f'created communities')
303302

backend/src/communities.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
NODE_PROJECTION_ENTITY = "__Entity__"
1414
MAX_WORKERS = 10
1515
MAX_COMMUNITY_LEVELS = 3
16-
MIN_COMMUNITY_SIZE = 1
16+
MIN_COMMUNITY_SIZE = 1
17+
COMMUNITY_CREATION_DEFAULT_MODEL = "openai_gpt_4o"
1718

1819

1920
CREATE_COMMUNITY_GRAPH_PROJECTION = """
@@ -466,7 +467,7 @@ def clear_communities(gds):
466467
raise
467468

468469

469-
def create_communities(uri, username, password, database,model):
470+
def create_communities(uri, username, password, database,model=COMMUNITY_CREATION_DEFAULT_MODEL):
470471
try:
471472
gds = get_gds_driver(uri, username, password, database)
472473
clear_communities(gds)

0 commit comments

Comments
 (0)