* Update remove_color_codes to handle non-string input
The `remove_color_codes` function now accepts any type of input that can be cast to a string. Previously, it was only accepting string input and not casting non-string types to string which was causing errors in some cases.
The changes were made to both logs.py and its corresponding test file.
* Refactor AIConfig to Sanitize Input for Goal Parameters
Details:
- Modified `ai_config.py` to correctly handle and sanitize user input for AI goals and convert them to formatted strings, to fix an issue where some specially formatted ai_settings.yaml files were causing goals to load as list[dict]
- `test_ai_config.py` includes a test for the `sanitize_input` function in `AIConfig` class.
- Removed unnecessary tests from `test_logs.py`
* Update for readabiity
* Update for readabiity
* Updates for conciceness
* Updated tests to confirm AIConfig saves goals as strings
* FIxed trailing space at end of line
---------
Co-authored-by: Luke Kyohere <lkyohere@mfsafrica.com>
Co-authored-by: James Collins <collijk@uw.edu>
* move remove_color_codes to utils and add tests
* Fix for ai_settings goals loaded as list(dict)
Some ai_settings formats can cause goals to load as list(dict)
not list(str)
Refactor code in utils.py to explicitly convert input type to string in
remove_color_codes() function.
- Updated remove_color_codes function to convert input argument
to string type explicitly to avoid unexpected type errors.
- Test case added to check conversion of dict to string in
remove_color_codes function.
* Update tests/test_utils.py
Co-authored-by: James Collins <collijk@uw.edu>
* move remove_color_codes fn and tests to proper files
---------
Co-authored-by: Luke Kyohere <lkyohere@mfsafrica.com>
Co-authored-by: James Collins <collijk@uw.edu>
* integration tests in ci pipeline
* Update CONTRIBUTING.md
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
---------
Co-authored-by: Reinier van der Leer <github@pwuts.nl>
* Extract retry logic, unify embedding functions
* Add some docstrings
* Remove embedding creation from API manager
* Add test suite for retry handler
* Make api manager fixture
* Fix typing
* Streamline tests
* Update Python version and benchmark file in benchmark.yml
* Refactor main function and imports in cli.py
* Update import statement in ai_config.py
* Add set_temperature and set_memory_backend methods in config.py
* Remove unused import in prompt.py
* Add goal oriented tasks workflow
* Added agent_utils to create agent
* added pytest and vcrpy
* added write file cassette
* created goal oriented task write file with cassettes to not pay openai tokens
* solve conflicts
* add ability set azure because github workflow needs it off
* solve conflicts in cli.py
* black because linter fails
* solve conflict
* setup github action to v3
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* fix conflicts
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* Plugins: debug line always printed in plugin load
* add decorator to tests
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* move decorator higher up
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
* init
* more tests
* passing tests
* skip gitbranch decorator on ci
* decorator skiponci
* black
* Update tests/utils.py decorator of skipping ci
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
* black
* I oopsed the name
* black
* finally
* simple tests for agent and manager
* ísort
---------
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Merwane Hamadi <merwanehamadi@gmail.com>
Co-authored-by: Merwane Hamadi <merwane.hamadi@redica.com>
Co-authored-by: Richard Beales <rich@richbeales.net>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: BillSchumacher <34168009+BillSchumacher@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nicktindle@outlook.com>
* Collect all embedding code into a single module
* Collect all embedding code into a single module
* actually, llm_utils is a better place
* Oh, and remove the module now that we don't use it
---------
Co-authored-by: Nicholas Tindle <nick@ntindle.com>