Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Use UTF-8 for adaptive CRAG docs (#852)

Rolly Calma71d4fd3e0c0a
diff --git a/examples/adaptive-crag/application.py b/examples/adaptive-crag/application.py
index 912402e1..1e5c2f95 100644
--- a/examples/adaptive-crag/application.py
+++ b/examples/adaptive-crag/application.py
@@ -101,8 +101,9 @@ def load_burr_docs(
files_iter = file_names
docs = []
for file in files_iter:
+ doc_path = (burr_docs_dir / Path(file).name).with_suffix(".txt")
docs += merge_short_docs(
- docs=(burr_docs_dir / Path(file).name).with_suffix(".txt").read_text().split("\n\n"),
+ docs=doc_path.read_text(encoding="utf-8").split("\n\n"),
file_name=Path(file).stem,
doc_thresh=doc_thresh,
)