-
Notifications
You must be signed in to change notification settings - Fork 9
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 #519 from ohcnetwork/master
Production Release: Switch to Milvus, Added GPT-4 support
- Loading branch information
Showing
33 changed files
with
1,678 additions
and
1,146 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
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,50 +1,49 @@ | ||
# Ayushma AI | ||
|
||
This is a Django Project. | ||
Empowering Nurses with Multilingual ICU Protocols. Leveraging the rapid advancements in AI technology, created multilingual interfaces that assist nurses in rapidly upgrading their knowledge about ICU protocols. This is a Django project. | ||
|
||
## Requirements | ||
|
||
- Python 3.8 | ||
- Postgres 15 | ||
- OpenAI Account with a valid API Key | ||
- Pinecone Account with a valid API Key | ||
- Docker | ||
|
||
## Optional Requirements | ||
|
||
- Docker | ||
- Pinecone Account with a valid API Key | ||
- AWS SES Accout | ||
- AWS S3 Account | ||
- Google Cloud account with access to speech to text API | ||
|
||
## Installation | ||
## Running the Project | ||
|
||
create a virtual environment and install the requirements | ||
> We strongly recommend using Docker to run the project. Manual methods are not supported at the moment. | ||
```bash | ||
pip3 install --user virtualenv | ||
virtualenv .venv | ||
source .venv/bin/activate | ||
pip3 install -r requirements/local.txt | ||
make up | ||
``` | ||
|
||
## Env Variables | ||
|
||
You can add these at the end of your `activate` file in `[virtualenvfolder] -> bin` like `export [env] = [value]` | ||
|
||
| Variable | Description | ||
| --- | --- | ||
| AI_NAME | Name of the AI (default: Ayushma) | ||
| OPENAI_API_KEY | OpenAI API Key | ||
| PINECONE_API_KEY | Pinecone API Key | ||
| PINECONE_ENVIRONMENT | Pinecone Environment | ||
| PINECONE_INDEX | Pinecone Index | ||
| CURRENT_DOMAIN | Current Domain where the frontend is hosted. ex. `https://ayushma.ohc.network` | ||
| EMAIL_HOST | SES Email Host (Optional) | ||
| EMAIL_USER | SES Email User (Optional) | ||
| EMAIL_PASSWORD | SES Email Password (Optional) | ||
| GOOGLE_APPLICATION_CREDENTIALS | Google Cloud Credentials (Optional). These should be in a file named `gc_credential.json` in the root of the project | ||
| S3_SECRET_KEY | AWS S3 Secret Key (Optional) | ||
| S3_KEY_ID | AWS S3 Key ID (Optional) | ||
| S3_BUCKET_NAME | AWS S3 Bucket Name (Optional) | ||
| S3_REGION | AWS S3 Region (Optional) | ||
| GOOGLE_RECAPTCHA_SECRET_KEY | Google Recaptcha Secret Key (Optional) | ||
Add these environment variables to your `.env` file. | ||
|
||
| Variable | Description | | ||
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------- | | ||
| AI_NAME | Name of the AI (default: Ayushma) | | ||
| OPENAI_API_KEY | OpenAI API Key | | ||
| PINECONE_API_KEY | Pinecone API Key | | ||
| PINECONE_INDEX | Pinecone Index | | ||
| VECTOR_DB | The Vector DB you would like to choose. "milvus" (default) or "pinecone" | | ||
| CURRENT_DOMAIN | Current Domain where the frontend is hosted. ex. `https://ayushma.ohc.network` | | ||
| EMAIL_HOST | SES Email Host (Optional) | | ||
| EMAIL_USER | SES Email User (Optional) | | ||
| EMAIL_PASSWORD | SES Email Password (Optional) | | ||
| GOOGLE_APPLICATION_CREDENTIALS | Google Cloud Credentials (Optional). These should be in a file named `gc_credential.json` in the root of the project | | ||
| S3_SECRET_KEY | AWS S3 Secret Key (Optional) | | ||
| S3_KEY_ID | AWS S3 Key ID (Optional) | | ||
| S3_BUCKET_NAME | AWS S3 Bucket Name (Optional) | | ||
| S3_REGION | AWS S3 Region (Optional) | | ||
| GOOGLE_RECAPTCHA_SECRET_KEY | Google Recaptcha Secret Key (Optional) | | ||
|
||
## Google Cloud | ||
|
||
To use Google Cloud Speech to Text API, you need to enable the API and create a service account. Download the credentials and save them in a file named `gc_credential.json` in the root of the project. |
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
Empty file.
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
ayushma/migrations/0053_alter_chat_model_alter_project_model.py
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,46 @@ | ||
# Generated by Django 4.2.6 on 2024-07-02 16:07 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("ayushma", "0052_document_failed"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="chat", | ||
name="model", | ||
field=models.IntegerField( | ||
blank=True, | ||
choices=[ | ||
(1, "Gpt 3 5"), | ||
(2, "Gpt 3 5 16K"), | ||
(3, "Gpt 4"), | ||
(4, "Gpt 4 32K"), | ||
(5, "Gpt 4 Visual"), | ||
(6, "Gpt 4 Turbo"), | ||
(7, "Gpt 4 Omni"), | ||
], | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="project", | ||
name="model", | ||
field=models.IntegerField( | ||
choices=[ | ||
(1, "Gpt 3 5"), | ||
(2, "Gpt 3 5 16K"), | ||
(3, "Gpt 4"), | ||
(4, "Gpt 4 32K"), | ||
(5, "Gpt 4 Visual"), | ||
(6, "Gpt 4 Turbo"), | ||
(7, "Gpt 4 Omni"), | ||
], | ||
default=1, | ||
), | ||
), | ||
] |
48 changes: 48 additions & 0 deletions
48
ayushma/migrations/0054_alter_chat_model_alter_project_model.py
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,48 @@ | ||
# Generated by Django 4.2.6 on 2024-07-24 14:21 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("ayushma", "0053_alter_chat_model_alter_project_model"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="chat", | ||
name="model", | ||
field=models.IntegerField( | ||
blank=True, | ||
choices=[ | ||
(1, "Gpt 3 5"), | ||
(2, "Gpt 3 5 16K"), | ||
(3, "Gpt 4"), | ||
(4, "Gpt 4 32K"), | ||
(5, "Gpt 4 Visual"), | ||
(6, "Gpt 4 Turbo"), | ||
(7, "Gpt 4 Omni"), | ||
(8, "Gpt 4 Omni Mini"), | ||
], | ||
null=True, | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="project", | ||
name="model", | ||
field=models.IntegerField( | ||
choices=[ | ||
(1, "Gpt 3 5"), | ||
(2, "Gpt 3 5 16K"), | ||
(3, "Gpt 4"), | ||
(4, "Gpt 4 32K"), | ||
(5, "Gpt 4 Visual"), | ||
(6, "Gpt 4 Turbo"), | ||
(7, "Gpt 4 Omni"), | ||
(8, "Gpt 4 Omni Mini"), | ||
], | ||
default=1, | ||
), | ||
), | ||
] |
52 changes: 52 additions & 0 deletions
52
ayushma/migrations/0055_testresult_model_testrun_models.py
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,52 @@ | ||
# Generated by Django 4.2.6 on 2024-07-26 11:39 | ||
|
||
import django.contrib.postgres.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("ayushma", "0054_alter_chat_model_alter_project_model"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="testresult", | ||
name="model", | ||
field=models.IntegerField( | ||
blank=True, | ||
choices=[ | ||
(1, "Gpt 3 5"), | ||
(2, "Gpt 3 5 16K"), | ||
(3, "Gpt 4"), | ||
(4, "Gpt 4 32K"), | ||
(5, "Gpt 4 Visual"), | ||
(6, "Gpt 4 Turbo"), | ||
(7, "Gpt 4 Omni"), | ||
(8, "Gpt 4 Omni Mini"), | ||
], | ||
null=True, | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="testrun", | ||
name="models", | ||
field=django.contrib.postgres.fields.ArrayField( | ||
base_field=models.IntegerField( | ||
choices=[ | ||
(1, "Gpt 3 5"), | ||
(2, "Gpt 3 5 16K"), | ||
(3, "Gpt 4"), | ||
(4, "Gpt 4 32K"), | ||
(5, "Gpt 4 Visual"), | ||
(6, "Gpt 4 Turbo"), | ||
(7, "Gpt 4 Omni"), | ||
(8, "Gpt 4 Omni Mini"), | ||
] | ||
), | ||
default=list, | ||
size=None, | ||
), | ||
), | ||
] |
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
Oops, something went wrong.