-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use model context for assistant agent, refactor model context (#4681)
* Decouple model_context from AssistantAgent * add UnboundedBufferedChatCompletionContext to mimic pervious model_context behaviour on AssistantAgent * moving unbounded buffered chat to a different file * fix model_context assertions in test_group_chat * Refactor model context, introduce states * fixes * update --------- Co-authored-by: aditya.kurniawan <[email protected]> Co-authored-by: Eric Zhu <[email protected]> Co-authored-by: Victor Dibia <[email protected]>
- Loading branch information
1 parent
a271708
commit c989181
Showing
13 changed files
with
183 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 6 additions & 1 deletion
7
python/packages/autogen-core/src/autogen_core/model_context/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
from ._buffered_chat_completion_context import BufferedChatCompletionContext | ||
from ._chat_completion_context import ChatCompletionContext | ||
from ._chat_completion_context import ChatCompletionContext, ChatCompletionContextState | ||
from ._head_and_tail_chat_completion_context import HeadAndTailChatCompletionContext | ||
from ._unbounded_chat_completion_context import ( | ||
UnboundedChatCompletionContext, | ||
) | ||
|
||
__all__ = [ | ||
"ChatCompletionContext", | ||
"ChatCompletionContextState", | ||
"UnboundedChatCompletionContext", | ||
"BufferedChatCompletionContext", | ||
"HeadAndTailChatCompletionContext", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.