MCPcopy Create free account
hub / github.com/FSoft-AI4Code/HyperAgent / read_key

Function read_key

src/hyperagent/cli/cli.py:44–52  ·  view source on GitHub ↗
(console: Console)

Source from the content-addressed store, hash-verified

42console = Console(history_dir=config_dir / "history")
43
44def read_key(console: Console):
45 openai_api_key = os.environ.get("OPENAI_API_KEY", None)
46 if openai_api_key is None:
47 console.info("Please provide an OpenAI API key.")
48 openai_api_key = console.prompt(
49 "Please key in a valid OpenAI Key: ",
50 is_password=True,
51 )
52 return openai_api_key
53
54@setup_app.callback(invoke_without_command=True)
55def setup(

Callers 1

queryFunction · 0.85

Calls 3

getMethod · 0.80
infoMethod · 0.80
promptMethod · 0.80

Tested by

no test coverage detected