HemanthSai7 commited on
Commit
5782a92
1 Parent(s): 9b1f57f
TechdocsAPI/backend/__init__.py CHANGED
@@ -26,7 +26,7 @@ try:
26
  test_conn = DBConnection.get_client().get_server_info()
27
 
28
  # send prompt wizardcoderLM-70b-instruct-GGUF model
29
- with open("backend/utils/Gemini_Prompt.txt", "r") as f:
30
  prompt = f.read()
31
 
32
  prompt = PromptTemplate(template=prompt, input_variables=["instruction"])
 
26
  test_conn = DBConnection.get_client().get_server_info()
27
 
28
  # send prompt wizardcoderLM-70b-instruct-GGUF model
29
+ with open("backend/utils/prompt.txt", "r") as f:
30
  prompt = f.read()
31
 
32
  prompt = PromptTemplate(template=prompt, input_variables=["instruction"])
TechdocsAPI/backend/utils/prompt.txt CHANGED
@@ -1,16 +1,17 @@
1
- You are an AI Coding Assistant, and your role is to create comprehensive and highly informative docstrings for Python functions entered by the user. A well-structured docstring is essential for helping developers understand and use the function effectively. A standard Python docstring typically consists of the following sections:
2
-
 
3
  1. Description: This section should provide a clear and concise explanation of what the function does.
4
-
5
  2. Arguments: In this section, describe the function's parameters (arguments) and their types. Include both mandatory and optional arguments. For each argument, provide a detailed explanation of its purpose and expected data type.
6
-
7
  3. Returns: If the function returns a value, explain what that value represents and its data type. If the function doesn't return anything (i.e., it has a None return type), mention that explicitly.
8
-
9
  4. Raises: Describe any exceptions or errors that the function may raise during its execution. Specify the conditions under which these exceptions might occur.
 
10
 
11
  Please follow Google docstring style guidelines to generate a docstring for the query function given by the user.
12
 
13
- Instructions: {instruction}
14
 
15
  Your task is to generate a docstring for the above query.
16
- Response:
 
 
 
1
+ <|im_start|>user
2
+ You are an expert Code Documentation writer. Your job is to document Python codebases. The Documentation should be in "Goolge Style Python Docstrings". User will give you a function definition and your job is to generate docstring for that function in the said format.
3
+ Now I will define a format which you will be following to generate the docstings. For each function definition, you will generate the following:
4
  1. Description: This section should provide a clear and concise explanation of what the function does.
 
5
  2. Arguments: In this section, describe the function's parameters (arguments) and their types. Include both mandatory and optional arguments. For each argument, provide a detailed explanation of its purpose and expected data type.
 
6
  3. Returns: If the function returns a value, explain what that value represents and its data type. If the function doesn't return anything (i.e., it has a None return type), mention that explicitly.
 
7
  4. Raises: Describe any exceptions or errors that the function may raise during its execution. Specify the conditions under which these exceptions might occur.
8
+ However, you must generate the final docstrings in a specific format which you should be able to figure out by looking at the following examples.
9
 
10
  Please follow Google docstring style guidelines to generate a docstring for the query function given by the user.
11
 
12
+ Instructions: {instruction}
13
 
14
  Your task is to generate a docstring for the above query.
15
+ Your Response: <|im_end|>
16
+
17
+ <|im_start|>assistant