refactor(knowledge-base mcp server): adjust formatting for consistency and readability
Improved code formatting, line breaks, and indentation across chunking logic and multiple test modules to enhance code clarity and maintain consistent style. No functional changes made.
This commit is contained in:
@@ -145,8 +145,7 @@ class SearchEngine:
|
||||
|
||||
# Filter by threshold (keyword search scores are normalized)
|
||||
filtered = [
|
||||
(emb, score) for emb, score in results
|
||||
if score >= request.threshold
|
||||
(emb, score) for emb, score in results if score >= request.threshold
|
||||
]
|
||||
|
||||
return [
|
||||
@@ -204,10 +203,9 @@ class SearchEngine:
|
||||
)
|
||||
|
||||
# Filter by threshold and limit
|
||||
filtered = [
|
||||
result for result in fused
|
||||
if result.score >= request.threshold
|
||||
][:request.limit]
|
||||
filtered = [result for result in fused if result.score >= request.threshold][
|
||||
: request.limit
|
||||
]
|
||||
|
||||
return filtered
|
||||
|
||||
|
||||
Reference in New Issue
Block a user