refine code: gloabl context to CONTEXT

This commit is contained in:
geekan 2024-01-10 13:56:02 +08:00
parent ba6793383f
commit f5bb850f25
18 changed files with 85 additions and 85 deletions

View file

@ -144,7 +144,7 @@ class ContextMixin(BaseModel):
"""Role context: role context > context"""
if self._context:
return self._context
return context
return CONTEXT
@context.setter
def context(self, context: Context):
@ -153,4 +153,4 @@ class ContextMixin(BaseModel):
# Global context, not in Env
context = Context()
CONTEXT = Context()