mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-04 08:42:38 +00:00
* for ephemeral traces * default false * simpler and consolidated * keep raising exception but catch it and continue if its for trace batches * cleanup * more cleanup * not using logger * refactor: rename TEMP_TRACING_RESOURCE to EPHEMERAL_TRACING_RESOURCE for clarity and consistency in PlusAPI; update related method calls accordingly * default true * drop print
14 lines
308 B
Python
14 lines
308 B
Python
from .utils import TokenManager
|
|
|
|
|
|
class AuthError(Exception):
|
|
pass
|
|
|
|
|
|
def get_auth_token() -> str:
|
|
"""Get the authentication token."""
|
|
access_token = TokenManager().get_token()
|
|
if not access_token:
|
|
raise AuthError("No token found, make sure you are logged in")
|
|
return access_token
|