Spaces:
Runtime error
Runtime error
Commit
·
6ac8f07
1
Parent(s):
3974c74
Update router
Browse files- backend/__init__.py +27 -27
backend/__init__.py
CHANGED
@@ -25,35 +25,35 @@ try:
|
|
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 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
|
35 |
-
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
prompt = PromptTemplate(template=prompt, input_variables=['instruction'])
|
42 |
-
|
43 |
-
llm = Clarifai(
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
)
|
50 |
-
|
51 |
-
llmchain = LLMChain(
|
52 |
-
|
53 |
-
|
54 |
-
)
|
55 |
-
|
56 |
-
app.state.llmchain = llmchain
|
57 |
|
58 |
except mysql.connector.Error as err:
|
59 |
raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(err))
|
|
|
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 |
+
|
43 |
+
# llm = Clarifai(
|
44 |
+
# pat = config.CLARIFAI_PAT,
|
45 |
+
# user_id = config.USER_ID,
|
46 |
+
# app_id = config.APP_ID,
|
47 |
+
# model_id = config.MODEL_ID,
|
48 |
+
# model_version_id=config.MODEL_VERSION_ID,
|
49 |
+
# )
|
50 |
+
|
51 |
+
# llmchain = LLMChain(
|
52 |
+
# prompt=prompt,
|
53 |
+
# llm=llm
|
54 |
+
# )
|
55 |
+
|
56 |
+
# app.state.llmchain = llmchain
|
57 |
|
58 |
except mysql.connector.Error as err:
|
59 |
raise HTTPException(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(err))
|