File tree Expand file tree Collapse file tree 4 files changed +20
-31
lines changed Expand file tree Collapse file tree 4 files changed +20
-31
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,17 @@ def __init__(self):
13
13
self .base_url_input = QLineEdit ()
14
14
self .api_key_input = QLineEdit ()
15
15
self .chat_model_input = QLineEdit ()
16
- self .search_next_button = QPushButton ()
17
- self .search_next_button .setText (language_wrapper .language_word_dict .get ("add_ai_model_pushbutton" ))
16
+ self .add_ai_info_button = QPushButton ()
17
+ self .add_ai_info_button .setText (language_wrapper .language_word_dict .get ("add_ai_model_pushbutton" ))
18
+ self .add_ai_info_button .clicked .connect (self .update_ai_config )
18
19
self .box_h_layout = QHBoxLayout ()
19
- self .box_h_layout .addWidget (self .search_next_button )
20
+ self .box_h_layout .addWidget (self .add_ai_info_button )
20
21
self .box_layout .addWidget (self .base_url_input )
21
22
self .box_layout .addWidget (self .api_key_input )
22
23
self .box_layout .addWidget (self .chat_model_input )
23
24
self .box_layout .addLayout (self .box_h_layout )
24
25
self .setWindowTitle (language_wrapper .language_word_dict .get ("add_ai_model_title" ))
25
26
self .setLayout (self .box_layout )
27
+
28
+ def update_ai_config (self ):
29
+ pass
Original file line number Diff line number Diff line change @@ -11,18 +11,3 @@ def __init__(self):
11
11
"AI_model" : {"ai_base_url" : "" , "ai_api_key" : "" , "chat_model" : "" }
12
12
}
13
13
14
-
15
- if __name__ == "__main__" :
16
- ai_config = AIConfig ()
17
- ai_config_file = Path (str (Path .cwd ()) + "/" + ".jeditor/ai_config.json" )
18
- if ai_config_file .exists ():
19
- with open (ai_config_file , "r" , encoding = "utf-8" ) as file :
20
- json_data : dict = read_json (str (ai_config_file ))
21
- if json_data :
22
- if json_data .get ("AI_model" ) and len (json_data .get ("AI_model" )) == 3 :
23
- ai_info : dict = json_data .get ("AI_model" )
24
- if ai_info .get ("ai_base_url" ) and ai_info .get ("chat_model" ):
25
- ai_config .choosable_ai .update (json_data )
26
- print (ai_config .choosable_ai )
27
- else :
28
- print ("OOO" )
Original file line number Diff line number Diff line change 1
- # Rename to build stable version
2
- # This is stable version
1
+ # Rename to build dev version
2
+ # This is dev version
3
3
[build-system ]
4
- requires = [" setuptools>=61.0 " ]
4
+ requires = [" setuptools" ]
5
5
build-backend = " setuptools.build_meta"
6
6
7
7
[project ]
8
- name = " je_editor "
9
- version = " 0.0.204 "
8
+ name = " je_editor_dev "
9
+ version = " 0.0.225 "
10
10
authors = [
11
11
{
name =
" JE-Chen" ,
email =
" [email protected] " },
12
12
]
@@ -23,11 +23,9 @@ classifiers = [
23
23
" Environment :: Win32 (MS Windows)" ,
24
24
" Environment :: MacOS X" ,
25
25
" Environment :: X11 Applications" ,
26
- " License :: OSI Approved :: MIT License" ,
27
26
" Operating System :: OS Independent"
28
27
]
29
28
30
-
31
29
[project .urls ]
32
30
Homepage = " https://github.com/JE-Chen/je_editor"
33
31
Documentation = " https://je-editor.readthedocs.io/en/latest/"
@@ -37,5 +35,6 @@ Code = "https://github.com/JE-Chen/je_editor"
37
35
file = " README.md"
38
36
content-type = " text/markdown"
39
37
38
+
40
39
[tool .setuptools .packages ]
41
40
find = { namespaces = false }
Original file line number Diff line number Diff line change 1
- # Rename to build dev version
2
- # This is dev version
1
+ # Rename to build stable version
2
+ # This is stable version
3
3
[build-system ]
4
- requires = [" setuptools" ]
4
+ requires = [" setuptools>=61.0 " ]
5
5
build-backend = " setuptools.build_meta"
6
6
7
7
[project ]
8
- name = " je_editor_dev "
9
- version = " 0.0.224 "
8
+ name = " je_editor "
9
+ version = " 0.0.204 "
10
10
authors = [
11
11
{
name =
" JE-Chen" ,
email =
" [email protected] " },
12
12
]
@@ -23,9 +23,11 @@ classifiers = [
23
23
" Environment :: Win32 (MS Windows)" ,
24
24
" Environment :: MacOS X" ,
25
25
" Environment :: X11 Applications" ,
26
+ " License :: OSI Approved :: MIT License" ,
26
27
" Operating System :: OS Independent"
27
28
]
28
29
30
+
29
31
[project .urls ]
30
32
Homepage = " https://github.com/JE-Chen/je_editor"
31
33
Documentation = " https://je-editor.readthedocs.io/en/latest/"
@@ -35,6 +37,5 @@ Code = "https://github.com/JE-Chen/je_editor"
35
37
file = " README.md"
36
38
content-type = " text/markdown"
37
39
38
-
39
40
[tool .setuptools .packages ]
40
41
find = { namespaces = false }
You can’t perform that action at this time.
0 commit comments