microsoft / generative-ai-for-beginners

18 Lessons, Get Started Building with Generative AI 🔗 https://microsoft.github.io/generative-ai-for-beginners/
https://microsoft.github.io/generative-ai-for-beginners/
MIT License
61.73k stars 31.41k forks source link

different handling environment (missing dotenv.load_dotenv() in sample 08) #542

Open bmerkle opened 1 month ago

bmerkle commented 1 month ago

Describe the bug most python samples use

# import dotenv
dotenv.load_dotenv()

However in sample08 the environment variables are only used, (so .env files are ignored) e.g. transcript_enrich_summaries.py

# no usage of dotenv
API_KEY = os.environ["AZURE_OPENAI_API_KEY"]

I could contribute a patch/merge request for this.

To Reproduce all python programs transcript*.py in C:\work\microsoft\generative-ai-for-beginners\08-building-search-applications\scripts are missing dotenv and are using the environment variables only.

Expected behavior dotenv should be used in all examples

github-actions[bot] commented 1 month ago

👋 Thanks for contributing @bmerkle! We will review the issue and get back to you soon.

bmerkle commented 3 days ago

is fixed via https://github.com/microsoft/generative-ai-for-beginners/pull/577