Update kadiApy_ragchain.py
Browse files- kadiApy_ragchain.py +15 -15
kadiApy_ragchain.py
CHANGED
@@ -248,21 +248,21 @@ class KadiApyRagchain:
|
|
248 |
"""
|
249 |
Generate a response using the retrieved contexts and the LLM.
|
250 |
"""
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
return self.llm.invoke(prompt).content
|
267 |
|
268 |
|
|
|
248 |
"""
|
249 |
Generate a response using the retrieved contexts and the LLM.
|
250 |
"""
|
251 |
+
prompt = f"""
|
252 |
+
You are a Python programming assistant specialized in the "Kadi-APY" library.
|
253 |
+
The "Kadi-APY" library is a Python package designed to facilitate interaction with the REST-like API of a software platform called Kadi4Mat.
|
254 |
+
Your task is to formulate the next logical question a programmer would ask themselves to implement and run the method provided in the "context".
|
255 |
+
|
256 |
+
"Context" contains snippets from the source code and metadata that provide details about the method.
|
257 |
+
|
258 |
+
Guidelines for generating questions:
|
259 |
+
- The question should be specific to the programmer's intent of using the method within a Python script.
|
260 |
+
- Focus on determining the entry point of the class to which the method belongs.
|
261 |
+
- Avoid vague or general questions; be precise about the next actionable steps.
|
262 |
+
|
263 |
+
Context:
|
264 |
+
{context}
|
265 |
+
"""
|
266 |
return self.llm.invoke(prompt).content
|
267 |
|
268 |
|