Spaces:
Runtime error
Runtime error
Commit
·
9bee466
1
Parent(s):
e1a2c1d
Update init
Browse files- backend/__init__.py +14 -2
backend/__init__.py
CHANGED
|
@@ -23,8 +23,20 @@ try:
|
|
| 23 |
test_conn = DBConnection.get_client().get_server_info()
|
| 24 |
|
| 25 |
# send prompt wizardcoderLM-70b-instruct-GGUF model
|
| 26 |
-
with open("backend/utils/prompt.txt",'r') as f:
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
prompt = PromptTemplate(template=prompt, input_variables=['instruction'])
|
| 30 |
|
|
|
|
| 23 |
test_conn = DBConnection.get_client().get_server_info()
|
| 24 |
|
| 25 |
# send prompt wizardcoderLM-70b-instruct-GGUF model
|
| 26 |
+
# with open("backend/utils/prompt.txt",'r') as f:
|
| 27 |
+
# prompt = f.read()
|
| 28 |
+
prompt = """You are an AI Coding Assitant and your task is to generate an elaborate, high quality docstring for the query function given by the user. A docstring consists of the following sections:
|
| 29 |
+
1. Description: Is the description of what the function does.
|
| 30 |
+
2. Arguments:
|
| 31 |
+
1. Argument Name: Description of the argument and its type.
|
| 32 |
+
3. Returns: Description of the return value of the function if any.
|
| 33 |
+
4. Raises: Description of the errors that can be raised by the function if any.
|
| 34 |
+
|
| 35 |
+
Instruction: {instruction}
|
| 36 |
+
|
| 37 |
+
Your task is to generate a docstring for the above query.
|
| 38 |
+
Response:
|
| 39 |
+
"""
|
| 40 |
|
| 41 |
prompt = PromptTemplate(template=prompt, input_variables=['instruction'])
|
| 42 |
|