diff --git a/samples/python/agents/travel_planner_agent/agent.py b/samples/python/agents/travel_planner_agent/agent.py index e8892724..82f5fd0b 100644 --- a/samples/python/agents/travel_planner_agent/agent.py +++ b/samples/python/agents/travel_planner_agent/agent.py @@ -17,10 +17,10 @@ def __init__(self): try: with open('config.json') as f: config = json.load(f) - if not os.getenv(config['api_key']): - print(f'{config["api_key"]} environment variable not set.') + if not config['api_key']: + print('api_key configuration not set.') sys.exit(1) - api_key = os.getenv(config['api_key']) + api_key = config['api_key'] self.model = ChatOpenAI( model=config['model_name'] or 'gpt-4o',