mcp examples: check for env vars needed for examples

This commit is contained in:
vipyne
2025-06-30 16:02:09 -05:00
parent 0204f6a95d
commit 889dc19a27
4 changed files with 32 additions and 0 deletions

View File

@@ -200,6 +200,14 @@ async def bot(runner_args: RunnerArguments):
if __name__ == "__main__":
if not os.getenv("NASA_API_KEY"):
logger.error(
f"Please set NASA_API_KEY environment variable for this example. See https://api.nasa.gov"
)
import sys
sys.exit(1)
from pipecat.runner.run import main
main()