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
team.invest() doesn't set action.llm.cost_manager,
Bug solved method
I think ContextMixin should be implemented as a singleton?
When instanciate new Action, it subclass ContextMixin. And I think the problem might be in this property. line = 78-83
@propertydefcontext(self) ->Context:
"""Role context: role context > context"""ifself.private_context:
returnself.private_contextreturnContext()
It returns a new context regardless of what cost_manager you set from team.invest(), because when we get llm from action instance, it use self.context
line 94-95
This was originally designed for priority of Context: Global > Env > Role > Action
But I noticed that the global Context was removed in a certain version, so there were corresponding modifications in a Commit.
I would like to raise a discussion, is it more reasonable to provide a GlobalEnv and use its Context by default?
Bug description
team.invest()
doesn't set action.llm.cost_manager,Bug solved method
I think ContextMixin should be implemented as a singleton?
When instanciate new Action, it subclass
ContextMixin
. And I think the problem might be in this property.line = 78-83
It returns a new context regardless of what
cost_manager
you set fromteam.invest()
, because when we get llm from action instance, it useself.context
line 94-95
Environment information
The text was updated successfully, but these errors were encountered: