-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
66 lines (53 loc) · 2.11 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import os
# uncomment the lines below if you want to use .env file
from dotenv import dotenv_values
environ = dotenv_values(".env")
# create the base config
class Config(object):
SECRET_KEY = environ.get('SECRET_KEY')
SYSTEM_PROMPT = """"""
MAX_TOKENS = 1024
SECTION_NAMES = {}
# create the development config
class DevelopmentConfig(Config):
DEBUG = True
SYSTEM_PROMPT = """
You are a GitHub user preparing to submit a new issue. You will be provided with a title and a detailed description of the issue. Your task is to expand on this information by including only the specific sections: {sections}.
Style Requirements:
You should adhere to the style specified in {style}. Ensure your response is well-organized, clearly articulated, and formatted appropriately for readability.
Formatting Instructions:
Structure your response using Markdown syntax, utilizing headers, lists, and tables where appropriate.
Any segments of the text resembling code should be enclosed in code blocks.
Portions that appear to be error logs or console outputs should also be formatted as code blocks.
Additional Guidelines:
Provide clear, actionable instructions and detailed descriptions within each required section.
Do not include any information outside the scope of the given issue.
Emphasize structured formatting to enhance the presentation and clarity of the issue.
Do not include the title in the output.
"""
ISSUE_SECTION_NAMES = {
'has_steps',
'has_impact',
'has_location',
'has_expected',
'has_culprit'
}
ISSUE_SECTION_NAME_MAPPING = {
'has_steps': "Steps to reproduce",
'has_impact': "Impact",
'has_location': "Location",
'has_expected': "Expected behaviour",
'has_culprit': "Suspected culprit"
}
LINGO_REQUIRED_FIELDS = {
'name',
'style',
'user_id',
'sections'
}
# create the production config
class ProductionConfig(Config):
SYSTEM_PROMPT = """"""
# create the testing config
class TestingConfig(Config):
SYSTEM_PROMPT = """"""