Azure-Samples / Azure-Samples/python-openai-demos
Potential mismatch between the current repository, README, and the video walkthrough?
- Ngôn ngữ chính
- Python
- Star
- 383
- Fork
- 294
- Merge trung bình
- 3 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
Hello,
I am testing the repository in GitHub Codespaces and found what appears to be a mismatch between the current repository, README, and the video walkthrough.
Repository:
https://github.com/Azure-Samples/python-openai-demos
In the video walkthrough, the presenter states that:
* GitHub Models can be used from Codespaces.
* The default setup should work without additional configuration.
* Codespaces provides a GitHub token automatically.
However, when testing the current repository:
1. The current chat.py contains:
API_HOST = os.getenv("API_HOST", "azure")
2. Running chat.py after copying the sample environment file:
cp .env.sample .env
python chat.py
results in Azure authentication errors:
```
DefaultAzureCredential failed to retrieve a token...
```
3. GitHub Codespaces does appear to provide a GITHUB_TOKEN environment variable:
```
echo ${GITHUB_TOKEN:0:10}
```
returns a valid token prefix.
4. Attempting to configure:
"API_HOST=github"
does not work because the current code falls through to the OpenAI path and expects OPENAI_KEY instead.
As a result, a new user following the video walkthrough may reasonably expect the examples to run in Codespaces using GitHub Models, but the current repository appears to require Azure, OpenAI, or Ollama configuration instead.
Could you clarify whether:
* GitHub Models support was removed,
* the video references a different version of the repository,
* or the README/code should be updated to reflect the current recommended setup?
Additional note:
I also searched the repository for GITHUB_TOKEN references:
```
grep -R "GITHUB_TOKEN" .
```
The only matches were inside .git/hooks scripts and not within the application code itself. I could not find any GitHub Models-specific code path in the demo scripts.
This seems inconsistent with the video walkthrough, which demonstrates using GitHub Models directly from Codespaces with the automatically provided GITHUB_TOKEN.
Thank you for your time and for maintaining the project. Forgive me if I got anything mistaken or this was intentional.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách so sánh chat.py và .env.sample với hướng dẫn thiết lập trong README, sau đó chạy quy trình Codespaces được ghi lại và kiểm tra cách xử lý API_HOST. Xác nhận cấu hình host nào được repository hiện tại hỗ trợ và liệu GITHUB_TOKEN có được sử dụng hay không. Hoàn tất khi code, README và hướng dẫn bằng video mô tả nhất quán thiết lập được khuyến nghị và các yêu cầu xác thực.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github, python
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100