'cmm question --repeat' supports multiple questions, added tests and fixes #15
Reference in New Issue
Block a user
Delete Branch "repeat_multi"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR primarily modifies the
cmm question --repeatcommand to allow repeating multiple questions, instead of only the last one.Additionally, this PR includes the following changes:
ai_factory.py, added optional parameters 'def_ai' and 'def_model' to thecreate_aifunction which allows specifying a default AI and model.openai.py, a potential bug was fixed where the 'tags' attribute was updated to ensure it is always a set, even when 'otags' is None.question.py, a significant amount of new code was added to facilitate the 'repeat' functionality. This includes functions to create modified args based on an existing message (create_msg_args), to repeat a given list of messages (repeat_messages), and to invert the semantics of the INPUT tags for this command (invert_input_tag_args).main.py, the 'nargs' parameter was changed from+to*in the 'or-tags', 'and-tags', and 'exclude-tags' arguments to accommodate the updated handling of tags inquestion.py.test_common.pyfile was added which includes aFakeAIclass for testing purposes, and aTestWithFakeAIclass which includes a number of methods for asserting various conditions about messages.This PR also includes additional tests to verify the correct operation of the new 'repeat' functionality.
Make 'cmm question --repeat' support multiple questions, tests and fixesto 'cmm question --repeat' supports multiple questions, added tests and fixes