Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -109,15 +109,23 @@ with st.sidebar:
|
|
109 |
query_engine = index.as_query_engine(streaming=True)
|
110 |
|
111 |
# ====== Customise prompt template ======
|
112 |
-
qa_prompt_tmpl_str =
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
qa_prompt_tmpl = PromptTemplate(qa_prompt_tmpl_str)
|
122 |
|
123 |
query_engine.update_prompts(
|
|
|
109 |
query_engine = index.as_query_engine(streaming=True)
|
110 |
|
111 |
# ====== Customise prompt template ======
|
112 |
+
qa_prompt_tmpl_str = """
|
113 |
+
You are an AI assistant specialized in analyzing GitHub repositories.
|
114 |
+
|
115 |
+
Repository structure:
|
116 |
+
{tree}
|
117 |
+
---------------------
|
118 |
+
|
119 |
+
Context information from the repository:
|
120 |
+
{context_str}
|
121 |
+
---------------------
|
122 |
+
|
123 |
+
Given the repository structure and context above, provide a clear and precise answer to the query.
|
124 |
+
Focus on the repository's content, code structure, and implementation details.
|
125 |
+
If the information is not available in the context, respond with 'I don't have enough information about that aspect of the repository.'
|
126 |
+
|
127 |
+
Query: {query_str}
|
128 |
+
Answer: """
|
129 |
qa_prompt_tmpl = PromptTemplate(qa_prompt_tmpl_str)
|
130 |
|
131 |
query_engine.update_prompts(
|