-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from vintasoftware/docs/add-dev-setup
Adds setup guide and .env.example file
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
OPENAI_API_KEY=your-key-here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,83 @@ Django app to integrate with [OpenAI Assistants API](https://platform.openai.com | |
|
||
⚠️ Under heavy development. Not launched yet! | ||
|
||
## Dev Setup | ||
|
||
### Clone the repo | ||
|
||
`git clone [email protected]:vintasoftware/django-ai-assistant.git` | ||
|
||
### Set up a virtualenv, optionally set up nvm, and activate your environment(s) | ||
|
||
You can use [pyenv](https://github.com/pyenv/pyenv), [pipenv](https://github.com/pypa/pipenv/blob/main/docs/installation.md), vanilla venvs or the tool of your choice. | ||
|
||
[NVM](https://github.com/nvm-sh/nvm) | ||
|
||
### Install vite | ||
|
||
`npm install -g vite` or install locally if you prefer | ||
|
||
### Create a .env file at the root of the project | ||
|
||
`cp .env.example .env` | ||
|
||
To gather the API keys for these tools, head to the following links: | ||
- [OpenAI](https://platform.openai.com/api-keys) | ||
- [Weather](https://www.weatherapi.com/) | ||
- [Tavily](https://app.tavily.com/home) | ||
- [Firecrawl](https://www.firecrawl.dev/) | ||
|
||
### Build the frontend | ||
|
||
`cd frontend` | ||
|
||
`vite build` | ||
|
||
### Create a .env file at the example folder | ||
|
||
`cd example` | ||
|
||
`cp .env.example .env` | ||
|
||
### Install dependencies | ||
|
||
#### Backend | ||
|
||
`cd example` | ||
|
||
`poetry install` | ||
|
||
Install pre-commit hooks: | ||
|
||
`pre-commit install` | ||
|
||
#### Frontend | ||
|
||
`cd example` | ||
|
||
`npm install` | ||
|
||
### Run the project | ||
|
||
From the example folder: | ||
|
||
#### Frontend | ||
|
||
`npm run start` | ||
|
||
#### Backend | ||
|
||
`python manage.py migrate` | ||
|
||
`python manage.py createsuperuser` | ||
|
||
`python manage.py runserver` | ||
|
||
### Log in to Django Admin | ||
|
||
Go to /admin and log in with your superuser account. | ||
|
||
|
||
## Contributing | ||
|
||
If you wish to contribute to this project, please first discuss the change you wish to make via an [issue](https://github.com/vintasoftware/django-react-boilerplate/issues). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
OPENAI_API_KEY=your-key-here | ||
WEATHER_API_KEY=your-key-here | ||
TAVILY_API_KEY=your-key-here | ||
FIRECRAWL_API_KEY=your-key-here | ||
LANGCHAIN_API_KEY=your-key-here | ||
LANGCHAIN_TRACING_V2=True |