Skip to content

Commit 38854bf

Browse files
committed
fix: program name passed to retrieval system
1 parent 088dc5f commit 38854bf

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
networks:
22
default:
33
name: botnet
4-
external: true
4+
55

66
services:
77
app:

src/chatbot/agents/utils/agent_retriever.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def _get_relevant_documents(
118118
except Exception as e:
119119
return NOT_FOUND_MESSAGE, ref
120120
elif VECTOR_DB_TYPE == VectorDBTypes.INFINITY_RAGFLOW:
121-
121+
query = f"{query} {filter_program_name if filter_program_name else ''}"
122122
return retrieve_from_infinity_ragflow(
123123
CollectionNames.EXAMINATION_REGULATIONS, query
124124
)

src/chatbot/db/ragflow_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# TODO delete once metadata is added to RAGFlow API
1313
FAQ_BASE_URL = "https://uni-osnabrueck.de/"
14+
NUMBER_CHUNKS_RETRIEVE = 10 # number of chunks to retrieve
1415

1516

1617
class RetrievedDocs(BaseModel):
@@ -112,7 +113,7 @@ def retrieve_chunks(
112113
self,
113114
query: str,
114115
db_id: str,
115-
page_size: int = 10, # number of chunks to retrieve
116+
page_size: int = NUMBER_CHUNKS_RETRIEVE, # number of chunks to retrieve
116117
) -> List[Chunk]:
117118
"""Retrieve chunks from the RAGFlow database based on a query."""
118119
try:

0 commit comments

Comments
 (0)