MCPcopy
hub / github.com/crewAIInc/crewAI / __init__

Method __init__

lib/cli/src/crewai_cli/command.py:27–38  ·  view source on GitHub ↗
(self, telemetry: Telemetry)

Source from the content-addressed store, hash-verified

25
26class PlusAPIMixin:
27 def __init__(self, telemetry: Telemetry) -> None:
28 try:
29 telemetry.set_tracer()
30 self.plus_api_client = PlusAPI(api_key=get_auth_token())
31 except Exception:
32 telemetry.deploy_signup_error_span()
33 console.print(
34 "Please sign up/login to CrewAI+ before using the CLI.",
35 style="bold red",
36 )
37 console.print("Run 'crewai login' to sign up/login.", style="bold green")
38 raise AuthenticationRequiredError from None
39
40 def _validate_response(self, response: httpx.Response) -> None:
41 """Handle and display error messages from API responses.

Callers

nothing calls this directly

Calls 5

PlusAPIClass · 0.90
get_auth_tokenFunction · 0.90
set_tracerMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected