langchain/docs/getting_started
Steve Kim 613bf9b514
Update getting_started.md (#4482)
# Added another helpful way for developers who want to set OpenAI API
Key dynamically

Previous methods like exporting environment variables are good for
project-wide settings.
But many use cases need to assign API keys dynamically, recently.

```python
from langchain.llms import OpenAI
llm = OpenAI(openai_api_key="OPENAI_API_KEY")
```

## Before submitting
```bash
export OPENAI_API_KEY="..."
```
Or,
```python
import os
os.environ["OPENAI_API_KEY"] = "..."
```

<hr>

Thank you.
Cheers,
Bongsang
2023-05-17 21:32:25 -07:00
..
concepts.md docs: Concepts (#4734) 2023-05-15 11:09:25 -07:00
getting_started.md Update getting_started.md (#4482) 2023-05-17 21:32:25 -07:00
tutorials.md Add new links to Tutorials and YouTube pages (#4746) 2023-05-15 14:32:48 -07:00