* refactored code to simplify
* optimize function. Instead of iterating over each character, guess at size and then iterate by token.
* adding tests
* Add missing tests
* minor test fix
* simplified token truncation by using tiktoken to encode and decode
* updated truncated notification message
* Fix llm_config spec to use os.environ
* Add test case and fix bug in loop
---------
Co-authored-by: gagb <gagb@users.noreply.github.com>
* Add new capability to handle long context
* Make print conditional
* Remove superfluous comment
* Fix msg order
* Allow user to specify max_tokens
* Add ability to specify max_tokens per message; improve name
* Improve doc and readability
* Add tests
* Improve documentation and add tests per Erik and Chi's feedback
* Update notebook
* Update doc string of add to agents
* Improve doc string
* improve notebook
* Update github workflows for context handling
* Update docstring
* update notebook to use raw config list.
* Update contrib-openai.yml remove _target
* Fix code formatting
* Fix workflow file
* Update .github/workflows/contrib-openai.yml
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>