bupa1018 commited on
Commit
06b7edd
·
verified ·
1 Parent(s): 2c9ba24

Update kadiApy_ragchain.py

Browse files
Files changed (1) hide show
  1. kadiApy_ragchain.py +18 -18
kadiApy_ragchain.py CHANGED
@@ -245,25 +245,25 @@ class KadiApyRagchain:
245
 
246
 
247
  def formulate_question(self, source_code):
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
 
269
 
 
245
 
246
 
247
  def formulate_question(self, source_code):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
 
269