refine code: gloabl context to CONTEXT

This commit is contained in:
geekan 2024-01-10 13:56:02 +08:00 committed by 莘权 马
parent bee5a973d0
commit b0b6fbbba4
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()