Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,21 +103,15 @@ class DocumentRetrievalAndGeneration:
|
|
| 103 |
Solution: "Yes, the BQ25896 charger supports the I2C interface for communication."
|
| 104 |
</s>
|
| 105 |
"""
|
| 106 |
-
prompt2 = f"""
|
|
|
|
| 107 |
You are a knowledgeable assistant with access to a comprehensive database.
|
| 108 |
I need you to answer my question and provide related information in a specific format.
|
| 109 |
I have provided five relatable JSON files. Choose the most suitable chunks for answering the query.
|
| 110 |
Here's what I need:
|
| 111 |
Include a final answer without additional comments, sign-offs, or extra phrases. Be direct and to the point.
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
Here's my question:
|
| 116 |
-
Query: {query}
|
| 117 |
-
|
| 118 |
-
Solution==>
|
| 119 |
-
RETURN ONLY SOLUTION. IF THERE IS NO ANSWER RELATABLE IN RETRIEVED CHUNKS, RETURN "NO SOLUTION AVAILABLE"
|
| 120 |
-
|
| 121 |
Example1:
|
| 122 |
Query: "How to use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM",
|
| 123 |
Solution: "To use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM, you need to modify the configuration file of the NDK application. Specifically, change the processor reference from 'A15_0' to 'IPU1_0'."
|
|
@@ -125,8 +119,15 @@ class DocumentRetrievalAndGeneration:
|
|
| 125 |
Example2:
|
| 126 |
Query: "Can BQ25896 support I2C interface?",
|
| 127 |
Solution: "Yes, the BQ25896 charger supports the I2C interface for communication."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
</s>
|
| 129 |
-
|
| 130 |
"""
|
| 131 |
# prompt = f"Query: {query}\nSolution: {content}\n"
|
| 132 |
|
|
|
|
| 103 |
Solution: "Yes, the BQ25896 charger supports the I2C interface for communication."
|
| 104 |
</s>
|
| 105 |
"""
|
| 106 |
+
prompt2 = f"""
|
| 107 |
+
<s>
|
| 108 |
You are a knowledgeable assistant with access to a comprehensive database.
|
| 109 |
I need you to answer my question and provide related information in a specific format.
|
| 110 |
I have provided five relatable JSON files. Choose the most suitable chunks for answering the query.
|
| 111 |
Here's what I need:
|
| 112 |
Include a final answer without additional comments, sign-offs, or extra phrases. Be direct and to the point.
|
| 113 |
|
| 114 |
+
Examples:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
Example1:
|
| 116 |
Query: "How to use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM",
|
| 117 |
Solution: "To use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM, you need to modify the configuration file of the NDK application. Specifically, change the processor reference from 'A15_0' to 'IPU1_0'."
|
|
|
|
| 119 |
Example2:
|
| 120 |
Query: "Can BQ25896 support I2C interface?",
|
| 121 |
Solution: "Yes, the BQ25896 charger supports the I2C interface for communication."
|
| 122 |
+
|
| 123 |
+
content: {content}
|
| 124 |
+
|
| 125 |
+
Here's my question:
|
| 126 |
+
Query: {query}
|
| 127 |
+
|
| 128 |
+
Solution==>
|
| 129 |
+
RETURN ONLY SOLUTION. IF THERE IS NO ANSWER RELATABLE IN RETRIEVED CHUNKS, RETURN "NO SOLUTION AVAILABLE"
|
| 130 |
</s>
|
|
|
|
| 131 |
"""
|
| 132 |
# prompt = f"Query: {query}\nSolution: {content}\n"
|
| 133 |
|