Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -265,7 +265,7 @@ def format_kadi_apy_library_context(docs):
|
|
265 |
type_info = doc.metadata.get("type", "Unknown Type")
|
266 |
source_info = doc.metadata.get("source", "Unknown Type")
|
267 |
# Format metadata and document content
|
268 |
-
# print("
|
269 |
formatted_doc = f"# source: {source_info}\n# class: {class_info}\n# type: {type_info}\n{doc.page_content}\n\n\n"
|
270 |
doc_context.append(formatted_doc)
|
271 |
|
@@ -277,7 +277,7 @@ def format_kadi_api_doc_context(docs):
|
|
277 |
|
278 |
for doc in docs:
|
279 |
source_info = doc.metadata.get("source", "Unknown Type")
|
280 |
-
# print("
|
281 |
formatted_doc = f"# source: {source_info}\n{doc.page_content}\n\n\n"
|
282 |
doc_context.append(formatted_doc)
|
283 |
|
@@ -350,7 +350,7 @@ def rag_workflow(query):
|
|
350 |
code_context = format_kadi_apy_library_context(kadi_apy_sourcecode)
|
351 |
|
352 |
|
353 |
-
print("
|
354 |
print("::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
|
355 |
#for doc in kadi_apy_sourcecode:
|
356 |
# print(doc.metadata.get("source", "Unknown Type"))
|
@@ -404,7 +404,7 @@ def initialize():
|
|
404 |
|
405 |
download_gitlab_project_by_version()
|
406 |
|
407 |
-
code_folder_paths = []
|
408 |
doc_folder_paths = ['docs/source/']
|
409 |
|
410 |
|
@@ -432,11 +432,6 @@ def initialize():
|
|
432 |
initialize()
|
433 |
|
434 |
|
435 |
-
# Example usage
|
436 |
-
# embedding_model should be your embedding function or model instance
|
437 |
-
# vectorstore = get_chroma_vectorstore(embedding_model)
|
438 |
-
|
439 |
-
|
440 |
# Gradio utils
|
441 |
def check_input_text(text):
|
442 |
if not text:
|
|
|
265 |
type_info = doc.metadata.get("type", "Unknown Type")
|
266 |
source_info = doc.metadata.get("source", "Unknown Type")
|
267 |
# Format metadata and document content
|
268 |
+
# print(":}\n\n", doc.page_content)
|
269 |
formatted_doc = f"# source: {source_info}\n# class: {class_info}\n# type: {type_info}\n{doc.page_content}\n\n\n"
|
270 |
doc_context.append(formatted_doc)
|
271 |
|
|
|
277 |
|
278 |
for doc in docs:
|
279 |
source_info = doc.metadata.get("source", "Unknown Type")
|
280 |
+
# print(":}\n\n", doc.page_content)
|
281 |
formatted_doc = f"# source: {source_info}\n{doc.page_content}\n\n\n"
|
282 |
doc_context.append(formatted_doc)
|
283 |
|
|
|
350 |
code_context = format_kadi_apy_library_context(kadi_apy_sourcecode)
|
351 |
|
352 |
|
353 |
+
print("H")
|
354 |
print("::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
|
355 |
#for doc in kadi_apy_sourcecode:
|
356 |
# print(doc.metadata.get("source", "Unknown Type"))
|
|
|
404 |
|
405 |
download_gitlab_project_by_version()
|
406 |
|
407 |
+
code_folder_paths = ['kadi_apy']
|
408 |
doc_folder_paths = ['docs/source/']
|
409 |
|
410 |
|
|
|
432 |
initialize()
|
433 |
|
434 |
|
|
|
|
|
|
|
|
|
|
|
435 |
# Gradio utils
|
436 |
def check_input_text(text):
|
437 |
if not text:
|