Skip to content

Commit

Permalink
Separate contributing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsj committed Jun 20, 2024
1 parent cf99a96 commit 6bcd199
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 49 deletions.
71 changes: 71 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Contributing

## Local Dev Setup

### Clone the repo

`git clone git@github.com: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.

For installing Node, we recommend [NVM](https://github.com/nvm-sh/nvm).

### Install dependencies

#### Backend

`poetry install`

#### Frontend

```bash
cd frontend
npm install
```

### Install pre-commit hooks

`pre-commit install`

It's critical to run the pre-commit hooks before pushing your code to follow the project's code style, and avoid linting errors.

### Developing with the example project

Run the frontend project in build:watch mode:

```bash
cd frontend
npm run build:watch
```

Then follow the instructions in the [example README](example/README.md).

## Tests

Run tests with:

```bash
poetry run pytest
```

The tests use `pytest-vcr` to record and replay HTTP requests to AI models.

If you're implementing a new test that needs to call a real AI model, you need to set the `OPENAI_API_KEY` environment variable on root `.env` file.
Then, you will run the tests in record mode:

```bash
poetry run pytest --record-mode=once
```

## Documentation

We use [mkdocs-material](https://squidfunk.github.io/mkdocs-material/) to generate the documentation from markdown files.
Check the files in the `docs` directory.

To run the documentation locally, you need to run:

```bash
poetry run mkdocs serve
```
55 changes: 8 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,23 @@

# django-ai-assistant

Django app to integrate with [OpenAI Assistants API](https://platform.openai.com/docs/assistants/overview). Supports [Function calling](https://platform.openai.com/docs/assistants/tools/function-calling).
Combine the power of LLMs with Django's productivity to build intelligent applications.
Let AI Assistants call methods from Django's side and do anything your users need!

⚠️ Under heavy development. Not launched yet!
Use AI Tool Calling and RAG with Django to easily build state of the art AI Assistants.

## Dev Setup
⚠️ Under heavy development. Not publicly launched yet!

### Clone the repo

`git clone git@github.com: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 dependencies

#### Backend

`poetry install`

#### Frontend

```bash
cd frontend
npm install
```

### Install pre-commit hooks

`pre-commit install`

### Log in to Django Admin

Go to /admin and log in with your superuser account.

## Developing with the example project

Run the frontend project in build:watch mode:

```bash
cd frontend
npm run build:watch
```

Then follow the instructions in the [example README](example/README.md).
Please check the documentation: [https://vintasoftware.github.io/django-ai-assistant/](https://vintasoftware.github.io/django-ai-assistant/)

## 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).
You're welcome to contribute with Django AI Assistant! Please feel free to tackle existing [issues](https://github.com/vintasoftware/django-ai-assistant/issues). If you have a new idea, please open a new issue to discuss it.

Check our [contributing guide](https://github.com/vintasoftware/django-react-boilerplate/blob/main/CONTRIBUTING.md) to learn more about our development process and how you can test your changes to the boilerplate.
Check our [contributing guide](CONTRIBUTING.md) to learn more about how to develop and test the project locally, before opening a pull request.

## Commercial Support

[![alt text](https://avatars2.githubusercontent.com/u/5529080?s=80&v=4 "Vinta Logo")](https://www.vinta.com.br/)

This project is maintained by [Vinta Software](https://www.vinta.com.br/) and is used in products of Vinta's clients. We are always looking for exciting work! If you need any commercial support, feel free to get in touch: contact@vinta.com.br
This is an open-source project maintained by [Vinta Software](https://www.vinta.com.br/) and is used in products of Vinta's clients. We are always looking for exciting work! If you need any commercial support, feel free to get in touch: contact@vinta.com.br
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Django AI Assistant

Combine the power of Large Language Models with Django's productivity.
Combine the power of Large Language Models with Django's productivity to build intelligent applications.

Regardless of the feasibility of AGI, AI assistants are a new paradigm for computation.
AI agents and assistants allow devs to easily build applications that make smart decisions.

The latest LLMs from major AI providers have a "killer feature" called Tool Calling,
which enables AI models to call provided methods from Django's side, and essentially
which enables AI models to call methods from Django's side, and essentially
do anything a Django view can, such as DB queries, file management, external API calls, etc.

While users commonly interact with LLMs via conversations, AI Assistants can do a lot with any kind of string input, including JSON.
Expand Down

0 comments on commit 6bcd199

Please sign in to comment.