Files
t6_mem0/docs/quickstart.mdx
2023-07-16 16:33:30 -07:00

30 lines
762 B
Plaintext

---
title: '🚀 Quickstart'
description: '💡 Start building LLM powered bots under 30 seconds'
---
Install embedchain python package:
```bash
pip install embedchain
```
Run your first bot in python using the following code. Make sure to set the `OPENAI_API_KEY` 🔑 environment variable in the code.
```python
import os
from embedchain Import App
os.environ["OPENAI_API_KEY"] = "xxx"
elon_musk_bot = App()
# Embed Online Resources
elon_musk_bot.add("web_page", "https://en.wikipedia.org/wiki/Elon_Musk")
elon_musk_bot.add("web_page", "https://www.tesla.com/elon-musk")
response = elon_bot.query("How many companies does Elon Musk run?")
print(response)
# Answer: 'Elon Musk runs four companies: Tesla, SpaceX, Neuralink, and The Boring Company.'
```