ChatMasterMind Application Refactor and Enhancement #8

Merged
juk0de merged 122 commits from restructurings into main 2023-09-12 07:36:07 +02:00

122 Commits

Author SHA1 Message Date
Oleksandr Kozachuk
ddfcc71510 Merge branch 'restructurings.main' into restructurings 2023-09-11 13:28:56 +02:00
Oleksandr Kozachuk
17de0b9967 Remove old code. 2023-09-11 13:17:59 +02:00
33023d29f9 configuration: made 'default' AI ID optional 2023-09-11 13:09:45 +02:00
481f9ecf7c configuration: improved config file format 2023-09-11 13:09:45 +02:00
22fa187e5f question_cmd: when no tags are specified, no tags are selected 2023-09-11 13:09:45 +02:00
b840ebd792 message: to_file() now uses intermediate temporary file 2023-09-11 13:09:45 +02:00
66908f5fed message: fixed matching with empty tag sets 2023-09-11 13:09:45 +02:00
2e08ccf606 openai: stores AI.ID instead of AI.name in message 2023-09-11 13:09:44 +02:00
595ff8e294 question_cmd: added message filtering by tags 2023-09-11 13:09:44 +02:00
faac42d3c2 question_cmd: fixed '--ask' command 2023-09-11 13:09:44 +02:00
864ab7aeb1 chat: added check for existing files when creating new filenames 2023-09-11 13:09:44 +02:00
cc76da2ab3 chat: added 'update_messages()' function and test 2023-09-11 13:09:44 +02:00
f99cd3ed41 question_cmd: fixed source code extraction and added a testcase 2023-09-11 13:09:44 +02:00
Oleksandr Kozachuk
6f3ea98425 Small fixes. 2023-09-11 13:09:44 +02:00
Oleksandr Kozachuk
54ece6efeb Port print arguments -q/-a/-S from main to restructuring. 2023-09-11 13:09:44 +02:00
Oleksandr Kozachuk
86eebc39ea Allow in question -s for just sourcing file and -S to source file with ``` encapsulation. 2023-09-11 13:09:44 +02:00
3eca53998b question cmd: added tests 2023-09-11 13:09:44 +02:00
c4f7bcc94e question_cmd: fixes 2023-09-11 13:09:44 +02:00
c52713c833 configuration: added tests 2023-09-11 13:09:44 +02:00
ecb6994783 configuration et al: implemented new Config format 2023-09-11 13:09:44 +02:00
61e710a4b1 cmm: splitted commands into separate modules (and more cleanup) 2023-09-11 13:09:41 +02:00
21d39c6c66 cmm: removed all the old code and modules 2023-09-11 13:08:45 +02:00
6a4cc7a65d setup: added 'ais' subfolder 2023-09-11 13:07:46 +02:00
d6bb5800b1 test_main: temporarily disabled all testcases 2023-09-11 13:07:46 +02:00
034e4093f1 cmm: added 'question' command 2023-09-11 13:07:46 +02:00
7d15452242 added new module 'ai_factory' 2023-09-11 13:07:46 +02:00
823d3bf7dc added new module 'openai.py' 2023-09-11 13:07:46 +02:00
4bd144c4d7 added new module 'ai.py' 2023-09-11 13:07:46 +02:00
e186afbef0 cmm: the 'print' command now uses 'Message.from_file()' 2023-09-11 13:07:43 +02:00
5e4ec70072 cmm: tags completion now uses 'Message.tags_from_dir' (fixes tag completion for me) 2023-09-11 13:06:22 +02:00
4c378dde85 cmm: the 'hist' command now uses the new 'ChatDB' 2023-09-11 13:05:33 +02:00
8923a13352 cmm: the 'tags' command now uses the new 'ChatDB' 2023-09-11 13:04:08 +02:00
e1414835c8 chat: added functions for finding and deleting messages 2023-09-11 13:04:08 +02:00
abb7fdacb6 message / chat: output improvements 2023-09-11 13:04:08 +02:00
2e2228bd60 chat: new possibilites for adding messages and better tests 2023-09-11 13:04:08 +02:00
713b55482a message: added rename_tags() function and test 2023-09-11 13:04:08 +02:00
d35de86c67 message: fixed Answer header for TXT format 2023-09-11 13:04:08 +02:00
aba3eb783d message: improved robustness of Question and Answer content checks and tests 2023-09-11 13:04:08 +02:00
8e63831701 chat: added clear_cache() function and test 2023-09-11 13:04:08 +02:00
c318b99671 chat: improved history printing 2023-09-11 13:04:08 +02:00
48c8e951e1 chat: fixed handling of unsupported files in DB and chache dir 2023-09-11 13:04:08 +02:00
b22a4b07ed chat: added tags_frequency() function and test 2023-09-11 13:04:08 +02:00
33565d351d configuration: added AIConfig class 2023-09-11 13:04:08 +02:00
6737fa98c7 added tokens() function to Message and Chat 2023-09-11 13:04:08 +02:00
815a21893c added tests for 'chat.py' 2023-09-11 13:04:08 +02:00
64893949a4 added new module 'chat.py' 2023-09-11 13:04:08 +02:00
a093f9b867 tags: some clarification and new tests 2023-09-11 13:04:08 +02:00
dc3f3dc168 added 'message_in()' function and test 2023-09-11 13:04:08 +02:00
74c39070d6 fixed Message.filter_tags 2023-09-11 13:04:08 +02:00
fde0ae4652 fixed test case file cleanup 2023-09-11 13:04:08 +02:00
238dbbee60 fixed handling empty tags in TXT file 2023-09-11 13:04:08 +02:00
17f7b2fb45 Added tags filtering (prefix and contained string) to TagLine and Message 2023-09-11 13:04:08 +02:00
9c2598a4b8 tests: added testcases for Message.from/to_file() and others 2023-09-11 13:04:08 +02:00
acec5f1d55 tests: splitted 'test_main.py' into 3 modules 2023-09-11 13:04:08 +02:00
c0f50bace5 gitignore: added vim session file 2023-09-11 13:04:08 +02:00
30ccec2462 tags: TagLine constructor now supports multiline taglines and multiple spaces 2023-09-11 13:04:08 +02:00
09da312657 configuration: added 'as_dict()' as an instance function 2023-09-11 13:04:08 +02:00
33567df15f added testcases for messages.py 2023-09-11 13:04:08 +02:00
264979a60d added new module 'message.py' 2023-09-11 13:04:08 +02:00
061e5f8682 tags.py: converted most TagLine functions to module functions 2023-09-11 13:04:08 +02:00
2d456e68f1 added testcases for Tag and TagLine classes 2023-09-11 13:04:08 +02:00
8bd659e888 added new module 'tags.py' with classes 'Tag' and 'TagLine' 2023-09-11 13:04:08 +02:00
d4021eeb11 configuration: made 'default' AI ID optional 2023-09-11 07:38:49 +02:00
c143c001f9 configuration: improved config file format 2023-09-10 19:57:06 +02:00
59b851650a question_cmd: when no tags are specified, no tags are selected 2023-09-10 19:57:06 +02:00
6f71a2ff69 message: to_file() now uses intermediate temporary file 2023-09-10 19:57:06 +02:00
eca44b14cb message: fixed matching with empty tag sets 2023-09-10 19:55:21 +02:00
b48667bfa0 openai: stores AI.ID instead of AI.name in message 2023-09-10 19:18:44 +02:00
533ee1c1a9 question_cmd: added message filtering by tags 2023-09-10 19:18:44 +02:00
cf50818f28 question_cmd: fixed '--ask' command 2023-09-10 19:18:44 +02:00
dd3d3ffc82 chat: added check for existing files when creating new filenames 2023-09-10 19:18:44 +02:00
1e3bfdd67f chat: added 'update_messages()' function and test 2023-09-10 19:14:11 +02:00
53582a7123 question_cmd: fixed source code extraction and added a testcase 2023-09-10 19:14:11 +02:00
Oleksandr Kozachuk
39b518a8a6 Small fixes. 2023-09-09 16:05:27 +02:00
Oleksandr Kozachuk
d22877a0f1 Port print arguments -q/-a/-S from main to restructuring. 2023-09-09 15:38:40 +02:00
Oleksandr Kozachuk
7cf62c54ef Allow in question -s for just sourcing file and -S to source file with ``` encapsulation. 2023-09-09 15:16:17 +02:00
5fb5dde550 question cmd: added tests 2023-09-09 09:12:21 +02:00
c0b7d17587 question_cmd: fixes 2023-09-09 08:51:44 +02:00
76f2373397 configuration: added tests 2023-09-09 08:31:45 +02:00
eaa399bcb9 configuration et al: implemented new Config format 2023-09-09 08:31:45 +02:00
b1a23394fc cmm: splitted commands into separate modules (and more cleanup) 2023-09-09 08:31:45 +02:00
2df9dd6427 cmm: removed all the old code and modules 2023-09-08 13:04:11 +02:00
74a26b8c2f setup: added 'ais' subfolder 2023-09-08 09:44:07 +02:00
893917e455 test_main: temporarily disabled all testcases 2023-09-07 07:51:46 +02:00
ba5aa1fbc7 cmm: added 'question' command 2023-09-06 08:23:09 +02:00
eb2fcba99d added new module 'ai_factory' 2023-09-06 08:23:09 +02:00
b7e3ca7ca7 added new module 'openai.py' 2023-09-06 08:23:09 +02:00
aa322de718 added new module 'ai.py' 2023-09-06 08:23:09 +02:00
bf1cbff6a2 cmm: the 'print' command now uses 'Message.from_file()' 2023-09-06 08:23:09 +02:00
f93a57c00d cmm: tags completion now uses 'Message.tags_from_dir' (fixes tag completion for me) 2023-09-06 08:23:09 +02:00
b0504aedbe cmm: the 'hist' command now uses the new 'ChatDB' 2023-09-06 08:23:09 +02:00
eb0d97ddc8 cmm: the 'tags' command now uses the new 'ChatDB' 2023-09-06 08:23:09 +02:00
7e25a08d6e chat: added functions for finding and deleting messages 2023-09-06 08:23:09 +02:00
63040b3688 message / chat: output improvements 2023-09-04 23:03:29 +02:00
6e2d5009c1 chat: new possibilites for adding messages and better tests 2023-09-04 08:58:08 +02:00
44cd1fab45 message: added rename_tags() function and test 2023-09-03 09:09:39 +02:00
4b0f40bccd message: fixed Answer header for TXT format 2023-09-03 09:09:39 +02:00
fa292fb73a message: improved robustness of Question and Answer content checks and tests 2023-09-03 09:09:39 +02:00
f9d749cdd8 chat: added clear_cache() function and test 2023-09-03 09:09:39 +02:00
ba56caf013 chat: improved history printing 2023-09-03 09:09:39 +02:00
d80c3962bd chat: fixed handling of unsupported files in DB and chache dir 2023-09-03 09:09:39 +02:00
ddfe29b951 chat: added tags_frequency() function and test 2023-09-03 09:09:39 +02:00
d93598a74f configuration: added AIConfig class 2023-09-03 09:09:39 +02:00
7f612bfc17 added tokens() function to Message and Chat 2023-09-02 07:45:44 +02:00
93290da5b5 added tests for 'chat.py' 2023-09-02 07:45:44 +02:00
9f4897a5b8 added new module 'chat.py' 2023-09-02 07:45:44 +02:00
214a6919db tags: some clarification and new tests 2023-08-31 15:47:58 +02:00
b83cbb719b added 'message_in()' function and test 2023-08-31 09:21:51 +02:00
8e1cdee3bf fixed Message.filter_tags 2023-08-30 08:22:50 +02:00
73d2a9ea3b fixed test case file cleanup 2023-08-29 11:36:01 +02:00
169f1bb458 fixed handling empty tags in TXT file 2023-08-28 14:53:04 +02:00
7f91a2b567 Added tags filtering (prefix and contained string) to TagLine and Message 2023-08-28 14:53:04 +02:00
fc1b8006a0 tests: added testcases for Message.from/to_file() and others 2023-08-26 19:22:15 +02:00
aa89270876 tests: splitted 'test_main.py' into 3 modules 2023-08-26 19:22:15 +02:00
0d6a6dd604 gitignore: added vim session file 2023-08-26 19:22:15 +02:00
580c86e948 tags: TagLine constructor now supports multiline taglines and multiple spaces 2023-08-26 19:22:15 +02:00
879831d7f5 configuration: added 'as_dict()' as an instance function 2023-08-26 19:22:15 +02:00
dfc1261931 added testcases for messages.py 2023-08-26 19:22:10 +02:00
173a46a9b5 added new module 'message.py' 2023-08-26 10:52:38 +02:00
604e5ccf73 tags.py: converted most TagLine functions to module functions 2023-08-18 12:21:46 +02:00
ef46f5efc9 added testcases for Tag and TagLine classes 2023-08-18 12:21:46 +02:00
b13a68836a added new module 'tags.py' with classes 'Tag' and 'TagLine' 2023-08-18 12:21:46 +02:00