Spaces:
Sleeping
Sleeping
arjunanand13
commited on
Commit
•
cd5ac54
1
Parent(s):
8c9e081
Update app.py
Browse files
app.py
CHANGED
@@ -76,61 +76,65 @@ def format_prompt(query):
|
|
76 |
I need you to answer my question and provide related information in a specific format.
|
77 |
Here's what I need:
|
78 |
1. A brief, general response to my question based on related answers retrieved.
|
79 |
-
|
80 |
-
|
81 |
-
- "
|
82 |
-
- "
|
83 |
-
- "question": The related question.
|
84 |
-
- "answer": The related answer.
|
85 |
Here's my question:
|
86 |
{query}
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
-
Example 1:
|
90 |
-
{{
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
}}
|
112 |
-
|
113 |
-
Final Answer: 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'.
|
114 |
|
115 |
-
Example 2:
|
116 |
-
{{
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
}}
|
130 |
-
|
131 |
-
Final Answer: Yes, the BQ25896 charger supports the I2C interface for communication.
|
132 |
|
133 |
-
"""
|
134 |
|
135 |
|
136 |
return prompt
|
|
|
76 |
I need you to answer my question and provide related information in a specific format.
|
77 |
Here's what I need:
|
78 |
1. A brief, general response to my question based on related answers retrieved.
|
79 |
+
Include a brief final answer without additional comments, sign-offs, or extra phrases. Be direct and to the point.
|
80 |
+
2. A JSON-formatted output containing: ALL SOURCE DOCUMENTS
|
81 |
+
- "question": The ticketName
|
82 |
+
- "answer": The Responses
|
|
|
|
|
83 |
Here's my question:
|
84 |
{query}
|
85 |
+
"""
|
86 |
+
|
87 |
+
# - "related_questions": A list of related questions and their answers, each as a dictionary with the keys. Consider all source documents:
|
88 |
+
# - "question": The related question.
|
89 |
+
# - "answer": The related answer.
|
90 |
+
|
91 |
+
|
92 |
|
93 |
+
# Example 1:
|
94 |
+
# {{
|
95 |
+
# "question": "How to use IPU1_0 instead of A15_0 to process NDK in TDA2x-EVM",
|
96 |
+
# "answer": "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'.",
|
97 |
+
# "related_questions": [
|
98 |
+
# {{
|
99 |
+
# "question": "Can you provide MLBP documentation on TDA2?",
|
100 |
+
# "answer": "MLB is documented for DRA devices in the TRM book, chapter 24.12."
|
101 |
+
# }},
|
102 |
+
# {{
|
103 |
+
# "question": "Hi, could you share me the TDA2x documents about Security(SPRUHS7) and Cryptographic(SPRUHS8) addendums?",
|
104 |
+
# "answer": "Most of TDA2 documents are on ti.com under the product folder."
|
105 |
+
# }},
|
106 |
+
# {{
|
107 |
+
# "question": "Is any one can provide us a way to access CDDS for nessary docs?",
|
108 |
+
# "answer": "Which document are you looking for?"
|
109 |
+
# }},
|
110 |
+
# {{
|
111 |
+
# "question": "What can you tell me about the TDA2 and TDA3 processors? Can they / do they run Linux?",
|
112 |
+
# "answer": "We have moved your post to the appropriate forum."
|
113 |
+
# }}
|
114 |
+
# ]
|
115 |
+
# }}
|
116 |
+
|
117 |
+
# Final Answer: 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'.
|
118 |
|
119 |
+
# Example 2:
|
120 |
+
# {{
|
121 |
+
# "question": "Can BQ25896 support I2C interface?",
|
122 |
+
# "answer": "Yes, the BQ25896 charger supports the I2C interface for communication.",
|
123 |
+
# "related_questions": [
|
124 |
+
# {{
|
125 |
+
# "question": "What are the main features of BQ25896?",
|
126 |
+
# "answer": "The BQ25896 features include high-efficiency, fast charging capability, and a wide input voltage range."
|
127 |
+
# }},
|
128 |
+
# {{
|
129 |
+
# "question": "How to configure the BQ25896 for USB charging?",
|
130 |
+
# "answer": "To configure the BQ25896 for USB charging, set the input current limit and the charging current via I2C registers."
|
131 |
+
# }}
|
132 |
+
# ]
|
133 |
+
# }}
|
134 |
+
|
135 |
+
# Final Answer: Yes, the BQ25896 charger supports the I2C interface for communication.
|
136 |
|
137 |
+
# """
|
138 |
|
139 |
|
140 |
return prompt
|