MCPcopy Index your code
hub / github.com/AgentOps-AI/agentops / create

Method create

app/api/agentops/auth/session.py:65–77  ·  view source on GitHub ↗

Create a new session for a user. Args: user_id (UUID): The user ID to associate with the session Returns: Session: The newly created session

(cls, user_id: UUID)

Source from the content-addressed store, hash-verified

63
64 @classmethod
65 def create(cls, user_id: UUID) -> 'Session':
66 """
67 Create a new session for a user.
68
69 Args:
70 user_id (UUID): The user ID to associate with the session
71
72 Returns:
73 Session: The newly created session
74 """
75 session = cls(uuid4(), user_id)
76 cache.setex(_make_key(session.session_id), AUTH_SESSION_EXPIRY, str(session.user_id))
77 return session
78
79 def extend(self) -> None:
80 """

Callers 15

create_checkout_sessionFunction · 0.45
create_free_subscriptionFunction · 0.45
handle_invoice_createdFunction · 0.45
completionMethod · 0.45
stream_completionMethod · 0.45
async_chat_completionMethod · 0.45
completionMethod · 0.45
completionMethod · 0.45

Calls 2

_make_keyFunction · 0.85
setexMethod · 0.45

Tested by 7

test_openai_providerFunction · 0.36
test_anthropic_providerFunction · 0.36
test_ai21_providerFunction · 0.36
async_testFunction · 0.36
test_groq_providerFunction · 0.36
test_openaiFunction · 0.36