Add example of .env file#59
Conversation
|
目前代码里是按是否有相应配置来决定要使用OpenAI还是Azure的,并且在检测到有OpenAI的配置会直接使用OpenAI的API尝试,所以如果只是添加用例可能把几行都默认为注释状态比较好~ |
Maybe we can just keep it empty? (e.g. |
|
Yeah, it works too. |
|
You don't normally include the "" quotes in |
Updated. |
There was a problem hiding this comment.
Pull request overview
This PR adds a repository-root .env.example file so contributors can copy a ready-made template when configuring TypeChat examples that use OpenAI or Azure OpenAI credentials.
Changes:
- Add a new
.env.exampletemplate at the repo root. - Include example variables for OpenAI and Azure OpenAI setup.
- Mirror the environment variable guidance already documented in the examples docs/READMEs.
Show a summary per file
| File | Description |
|---|---|
.env.example |
Adds a sample .env template intended to simplify local example configuration. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
|
|
||
| # For OpenAI | ||
| # The OpenAI model name (e.g. `gpt-3.5-turbo` or `gpt-4`) | ||
| OPENAI_MODEL= | ||
| # Your OpenAI API key | ||
| OPENAI_API_KEY= | ||
|
|
||
| # For Azure OpenAI | ||
| # The full URL of the Azure OpenAI REST API (e.g. `https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2023-05-15`) | ||
| AZURE_OPENAI_ENDPOINT= | ||
| # Your Azure OpenAI API key | ||
| AZURE_OPENAI_API_KEY= |
This will make it easier for users to set up environment variables.