Skip to content

Commit

Permalink
Python: Update README.md to add clarity re: .env file (#10360)
Browse files Browse the repository at this point in the history
clarified where to put the .env file

### Motivation and Context
As currently written, it's confusing as to where to put the .env file.
The proposed changes clarify where to put the .env file.

This improves onboarding experience and documentation.


<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required? 

  3. What problem does it solve?
  5. What scenario does it contribute to?
  7. If it fixes an open issue, please link to the issue here.
-->

### Description
Minor changes to ReadMe to clarify where to put the .env file
<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [ ] The code builds clean without any errors or warnings
- [ ] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

Co-authored-by: Evan Mattson <[email protected]>
  • Loading branch information
jenfoxbot and moonbox3 authored Feb 4, 2025
1 parent 1b85aa9 commit f8592ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ AZURE_OPENAI_ENDPOINT=""
AZURE_OPENAI_API_KEY=""
```

You will then configure the Text/ChatCompletion class with the keyword argument `env_file_path`:
Put the .env file in the root directory.

If you place the .env in a different directory, configure the Text/ChatCompletion class with the keyword argument `env_file_path`:

```python
chat_completion = OpenAIChatCompletion(service_id="test", env_file_path=<path_to_file>)
Expand Down

0 comments on commit f8592ad

Please sign in to comment.