Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -335,7 +335,7 @@ def rag_workflow(query):
|
|
335 |
prompt = (
|
336 |
f"The query is: '{query}'. "
|
337 |
"Based on this query, choose the most appropriate option from the following: "
|
338 |
-
"'
|
339 |
"Respond only with one of these options—do not add any additional text or commentary."
|
340 |
)
|
341 |
metadata_prediction = llm.predict(prompt)
|
@@ -349,7 +349,7 @@ def rag_workflow(query):
|
|
349 |
doc_context = format_kadi_api_doc_context(kadi_apy_docs)
|
350 |
code_context = format_kadi_apy_library_context(kadi_apy_library_docs)
|
351 |
|
352 |
-
|
353 |
# Assuming kadi_apy_library_docs is a list of Document objects
|
354 |
|
355 |
print("HERE WE GHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
|
@@ -360,6 +360,7 @@ def rag_workflow(query):
|
|
360 |
print("::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
|
361 |
|
362 |
|
|
|
363 |
|
364 |
prompt = f"""You are an expert python developer. You are assisting in generating code for users who wants to make use of "kadi-apy", an API library.
|
365 |
"Doc-context:" provides you with information how to use this API library by givnig code examples and code documentation.
|
|
|
335 |
prompt = (
|
336 |
f"The query is: '{query}'. "
|
337 |
"Based on this query, choose the most appropriate option from the following: "
|
338 |
+
"'kadiAPY library"', 'kadiAPY cli library', 'kadiAPY command line'. "
|
339 |
"Respond only with one of these options—do not add any additional text or commentary."
|
340 |
)
|
341 |
metadata_prediction = llm.predict(prompt)
|
|
|
349 |
doc_context = format_kadi_api_doc_context(kadi_apy_docs)
|
350 |
code_context = format_kadi_apy_library_context(kadi_apy_library_docs)
|
351 |
|
352 |
+
|
353 |
# Assuming kadi_apy_library_docs is a list of Document objects
|
354 |
|
355 |
print("HERE WE GHOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO")
|
|
|
360 |
print("::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
|
361 |
|
362 |
|
363 |
+
|
364 |
|
365 |
prompt = f"""You are an expert python developer. You are assisting in generating code for users who wants to make use of "kadi-apy", an API library.
|
366 |
"Doc-context:" provides you with information how to use this API library by givnig code examples and code documentation.
|