You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If a user wants to change the behavior of any of the functions that got registered for a reply, it is not enough to overwrite this function in a child-class, as the register_reply function registers class-methods.
Instead a user has to replace the function with something similar as:
ind = [i for i, x in enumerate(self._reply_func_list) if hasattr(x["reply_func"],"__name__") and x["reply_func"].__name__ == "generate_oai_reply"]
assert len(ind) == 1
for i in ind:
self._reply_func_list.pop(i)
self.register_reply([Agent, None], self.generate_oai_reply, position=i)
after calling the constructor of the parent class.
Describe the solution you'd like
Make it somehow more easy for users to use custom reply functions. On idea is not using class-functions, as sketched here: #1209
Another would be an easy replacement of existing functions.
Additional context
No response
The text was updated successfully, but these errors were encountered:
I like this issue. This is touching the heart of what we are currently working on in #1215 and #1240. In short, we want to make it really easy for developers to compose agent. So you can customize your own agent by declaratively specify a list of components, without modifying the defaults like today.
What you are doing is a fine shortcut for the issue right now as you can go directly modify the _reply_func_list of the agent by adding or remove reply functions.
Is your feature request related to a problem? Please describe.
If a user wants to change the behavior of any of the functions that got registered for a reply, it is not enough to overwrite this function in a child-class, as the register_reply function registers class-methods.
Instead a user has to replace the function with something similar as:
after calling the constructor of the parent class.
Describe the solution you'd like
Make it somehow more easy for users to use custom reply functions. On idea is not using class-functions, as sketched here:
#1209
Another would be an easy replacement of existing functions.
Additional context
No response
The text was updated successfully, but these errors were encountered: