MCPcopy Create free account
hub / github.com/MemTensor/MemOS / __init__

Method __init__

src/memos/context/context.py:211–222  ·  view source on GitHub ↗
(self, target, args=(), kwargs=None, **thread_kwargs)

Source from the content-addressed store, hash-verified

209 """
210
211 def __init__(self, target, args=(), kwargs=None, **thread_kwargs):
212 super().__init__(**thread_kwargs)
213 self.target = target
214 self.args = args
215 self.kwargs = kwargs or {}
216
217 self.main_trace_id = get_current_trace_id()
218 self.main_api_path = get_current_api_path()
219 self.main_env = get_current_env()
220 self.main_user_type = get_current_user_type()
221 self.main_user_name = get_current_user_name()
222 self.main_context = get_current_context()
223
224 def run(self):
225 # Create a new RequestContext with the main thread's trace_id

Callers

nothing calls this directly

Calls 6

get_current_trace_idFunction · 0.85
get_current_api_pathFunction · 0.85
get_current_envFunction · 0.85
get_current_user_typeFunction · 0.85
get_current_user_nameFunction · 0.85
get_current_contextFunction · 0.85

Tested by

no test coverage detected