SIGN IN SIGN UP
microsoft / autogen UNCLAIMED

A programming framework for agentic AI

0 0 104 Python

Refactor transform_messages (#1631)

* 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>
D
dkirsche committed
a34e4cc515ae85c877a5e1ea59cc0bacf1320cd9
Parent: d8a204a
Committed by GitHub <noreply@github.com> on 2/20/2024, 10:53:05 PM