mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
note: note selector_func is not serializable (#6609)
Resolves #6519 --------- Co-authored-by: Victor Dibia <victor.dibia@gmail.com>
This commit is contained in:
@@ -384,6 +384,7 @@ class SelectorGroupChat(BaseGroupChat, Component[SelectorGroupChatConfig]):
|
||||
function that takes the conversation history and returns the name of the next speaker.
|
||||
If provided, this function will be used to override the model to select the next speaker.
|
||||
If the function returns None, the model will be used to select the next speaker.
|
||||
NOTE: `selector_func` is not serializable and will be ignored during serialization and deserialization process.
|
||||
candidate_func (Callable[[Sequence[BaseAgentEvent | BaseChatMessage]], List[str]], Callable[[Sequence[BaseAgentEvent | BaseChatMessage]], Awaitable[List[str]]], optional):
|
||||
A custom function that takes the conversation history and returns a filtered list of candidates for the next speaker
|
||||
selection using model. If the function returns an empty list or `None`, `SelectorGroupChat` will raise a `ValueError`.
|
||||
|
||||
@@ -438,6 +438,10 @@
|
||||
"\n",
|
||||
"```{note}\n",
|
||||
"Returning `None` from the custom selector function will use the default model-based selection.\n",
|
||||
"``` \n",
|
||||
"\n",
|
||||
"```{note}\n",
|
||||
"Custom selector functions are not [serialized](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/serialize-components.html) when `.dump_component()` is called on the SelectorGroupChat team . If you need to serialize team configurations with custom selector functions, consider implementing custom workflows and serialization logic.\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -19,6 +19,10 @@
|
||||
" \n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"```{note}\n",
|
||||
"`selector_func` is not serializable and will be ignored during serialization and deserialization process.\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
" \n",
|
||||
"### Termination Condition Example \n",
|
||||
"\n",
|
||||
|
||||
Reference in New Issue
Block a user