295 Commits

Author SHA1 Message Date
f17e76203a glossary cmd / main: added --print option 2024-02-26 16:34:30 +01:00
6a77ec1d3b glossary test: added testcase for to_str() without description 2024-02-26 16:27:00 +01:00
f298a68140 glossary cmd test: added test for listing glossaries 2024-02-26 16:27:00 +01:00
9bbf67af67 glossary: fixed printing of empty description 2024-02-26 16:27:00 +01:00
284dd13201 glossary cmd: fixed globbing in 'list_glossaries' 2024-02-26 16:27:00 +01:00
1932f8f6e9 configuration: improved error message when config file is missing 2024-02-26 16:27:00 +01:00
15e8f8fd6b main: resolved conflicting short parameters 2024-02-26 16:27:00 +01:00
9c683be994 glossary test: fixed cleanup of temporary files 2024-02-26 16:27:00 +01:00
92fb2bbe15 glossary: added '__post_init__' 2024-02-26 16:27:00 +01:00
2e0da31150 added test module for the 'glossary' command 2024-02-26 16:27:00 +01:00
ff6d4ded33 added 'glossary' command 2024-02-26 16:27:00 +01:00
5377dc0784 main: missing directories are now created if user agrees 2024-02-26 16:27:00 +01:00
3def4cb668 configuration: added 'glossaries' directory 2024-02-26 16:27:00 +01:00
580c506483 glossary: now supports quoted and unquoted entries (incl. tests) 2024-02-26 16:27:00 +01:00
a1a090bcae glossary test: added testcases for 'to_str()' 2024-02-26 16:27:00 +01:00
3cca32a40b glossary: added 'to_str()' function 2024-02-26 16:27:00 +01:00
1b39fb1ac5 glossary test: added description test 2024-02-26 16:27:00 +01:00
b4ef2e43ca glossary: added description and removed useless input stripping 2024-02-26 16:27:00 +01:00
ff1e405991 glossary test: added suffix testcases 2024-02-26 16:27:00 +01:00
4afd6d4e94 glossary: added suffix check 2024-02-26 16:27:00 +01:00
94b812c31e glossary: added test module for glossaries 2024-02-26 16:27:00 +01:00
be873867ea added module 'glossary.py' 2024-02-26 16:27:00 +01:00
82ad697b68 translation: added check for valid document format when using OpenAI 2024-02-26 16:27:00 +01:00
a185c0db7b translation: speficied / implemented the question format for OpenAI based translations 2024-02-26 16:27:00 +01:00
c1dc152f48 translation: some small required refactoring 2024-02-26 16:27:00 +01:00
f0129f7060 added new command 'translation' 2024-02-26 16:27:00 +01:00
Oleksandr Kozachuk
5d1bb1f9e4 Fix some of the commands. 2023-11-10 10:42:46 +01:00
Oleksandr Kozachuk
75a123eb72 Fix usage of the dynamic answer is some cases. 2023-10-24 12:59:13 +02:00
7c1c67f8ff Merge pull request 'Dynamic Answer class and OpenAI streaming API' (#19) from dynamic_answer into main
Introduces several changes with the main objective of enabling OpenAI's streaming API in the chatmastermind application. This allows for the retrieval of AI responses gradually as a stream, which can significantly improve the user experience in interactions that involve large result sets.

* Added tiktoken import in 'openai.py' and modifications to the OpenAI class to support streaming. This includes the addition of a new class OpenAIAnswer to handle streaming API responses.
* Modified request function in the OpenAI class: the stream=True flag is added to the openai.ChatCompletion.create method to enable streaming API.
* Modified 'question.py' to print the answer parts as they are streamed.
* Replaced the Answer class's string data type with a generator which supports str and Generator[str, None, None] data types. Modifications are made to the Answer class methods to handle both data types accordingly.
* Updated the tests in 'test_ais_openai.py' and 'test_message.py' to reflect and validate these changes.
2023-10-21 15:50:45 +02:00
Oleksandr Kozachuk
dbe72ff11c Activate and use OpenAI streaming API. 2023-10-21 14:21:48 +02:00
Oleksandr Kozachuk
bbc1ab5a0a Fix source_code function with the dynamic answer class. 2023-10-20 14:02:09 +02:00
Oleksandr Kozachuk
2aee018708 Refactor message.Answer class in a way, that it can be constructed dynamically step by step, in preparation of using streaming API. 2023-10-20 13:43:31 +02:00
ok
17c6fa2453 Merge pull request 'Configurable glob and location on question and hist commands' (#18) from cust_loc_glob into main
Reviewed-on: #18
2023-10-20 09:47:03 +02:00
5774278fb7 README: added new 'question' command parameters 2023-10-20 09:16:03 +02:00
40d0de50de cmm: limited the message locations for the new cmm parameters to those that make sense 2023-10-20 09:16:03 +02:00
72d31c26e9 main: improved parameter descriptions 2023-10-20 09:16:03 +02:00
980e5ac51f chat: changed default glob to '*.msg' in all ChatDB functions 2023-10-20 09:00:58 +02:00
Oleksandr Kozachuk
114282dfd8 Add --glob and --location flags to hist and question commands, to be able to specify the location and files they should use. 2023-10-19 16:03:51 +02:00
Oleksandr Kozachuk
9a493b57da Per default use only files with .msg suffix ignoring other files. 2023-10-19 16:02:40 +02:00
Oleksandr Kozachuk
9b0951cb3f Change type msg_location to an Enum instead of Literal to be able to get all values easy and improve type checks. 2023-10-19 16:00:44 +02:00
Oleksandr Kozachuk
5f29f60168 Add .old/ to git ignore, I use that dir ofter for old files, I do not want to delete. 2023-10-17 11:53:49 +02:00
3ea1f49027 cmm: added options '--tight' and '--no-paging' to the 'hist --print' cmd 2023-10-02 08:35:19 +02:00
8f56399844 cmm: replaced options '--with-tags' and '--with-file' with '--with-metadata' 2023-10-01 10:11:16 +02:00
e4cb6eb22b README: updated 'hist' command description 2023-10-01 09:27:40 +02:00
e19c6bb1ea hist_cmd: added module 'test_hist_cmd.py' 2023-09-30 08:25:33 +02:00
811b2e6830 hist_cmd: implemented '--convert' option 2023-09-29 18:53:12 +02:00
2a8f01aee4 chat: 'msg_gather()' now supports globbing 2023-09-29 07:16:20 +02:00
efdb3cae2f question: moved around some code 2023-09-29 07:16:20 +02:00
aecfd1088d chat: added message file format as ChatDB class member 2023-09-29 07:16:20 +02:00
140dbed809 message: added function 'rm_file()' and test 2023-09-29 07:16:20 +02:00