Spaces:
Runtime error
Runtime error
Update chunking.py
Browse files- chunking.py +3 -3
chunking.py
CHANGED
|
@@ -58,11 +58,11 @@ def generate_code_chunks_with_metadata(code_file_content, code_file_path):
|
|
| 58 |
_iterate_ast(code_file_content, documents, code_file_path)
|
| 59 |
# Determine usage based on the file_path
|
| 60 |
if code_file_path.startswith("kadi_apy/lib/"):
|
| 61 |
-
usage = "
|
| 62 |
elif code_file_path.startswith("kadi_apy/cli/"):
|
| 63 |
-
usage = "
|
| 64 |
else:
|
| 65 |
-
usage = "
|
| 66 |
|
| 67 |
# Add metadata-type "usage" to all documents
|
| 68 |
for doc in documents:
|
|
|
|
| 58 |
_iterate_ast(code_file_content, documents, code_file_path)
|
| 59 |
# Determine usage based on the file_path
|
| 60 |
if code_file_path.startswith("kadi_apy/lib/"):
|
| 61 |
+
usage = "kadi_apy/lib/"
|
| 62 |
elif code_file_path.startswith("kadi_apy/cli/"):
|
| 63 |
+
usage = "kadi_apy/cli/"
|
| 64 |
else:
|
| 65 |
+
usage = "kadiAPY"
|
| 66 |
|
| 67 |
# Add metadata-type "usage" to all documents
|
| 68 |
for doc in documents:
|