Azure-Samples / Azure-Samples/python-openai-demos
Potential mismatch between the current repository, README, and the video walkthrough?
- 主要语言
- Python
- 星标
- 383
- 派生
- 294
- 平均合并
- 3 天 13 小时
- 30 天内合并 PR
- 1
描述
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.
贡献指南
调研方向
首先将 chat.py 和 .env.sample 与 README 中的设置说明进行比较,然后运行文档中说明的 Codespaces 流程并检查 API_HOST 的处理方式。确认当前仓库支持哪种 host 配置,以及是否使用了 GITHUB_TOKEN。当代码、README 和视频指南一致地描述推荐的设置和身份验证要求时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- github, python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100