Merge pull request #241 from ttt246/new-requirements
Browse files- .github/workflows/brain_ci.yml +3 -2
- .github/workflows/lint.yml +1 -0
- .gitignore +5 -1
- Brain/src/rising_plugin/gmail/email_plugin.py +0 -3
- README.md +1 -1
- app.py +0 -9
- requirements.txt +22 -79
- runtime.txt +1 -1
.github/workflows/brain_ci.yml
CHANGED
|
@@ -5,6 +5,7 @@ on:
|
|
| 5 |
pull_request:
|
| 6 |
paths:
|
| 7 |
- "Brain/**"
|
|
|
|
| 8 |
workflow_dispatch:
|
| 9 |
|
| 10 |
env:
|
|
@@ -23,7 +24,7 @@ jobs:
|
|
| 23 |
- uses: actions/checkout@v3
|
| 24 |
- uses: actions/setup-python@v4
|
| 25 |
with:
|
| 26 |
-
python-version: '3.
|
| 27 |
cache: 'pip'
|
| 28 |
- name: Brain - Install
|
| 29 |
run: pip install -r requirements.txt
|
|
@@ -34,4 +35,4 @@ jobs:
|
|
| 34 |
with:
|
| 35 |
# Sauce Labs Credentials.
|
| 36 |
sauce-username: ${{ secrets.SAUCE_USERNAME }}
|
| 37 |
-
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
|
|
|
|
| 5 |
pull_request:
|
| 6 |
paths:
|
| 7 |
- "Brain/**"
|
| 8 |
+
- "requirements.txt"
|
| 9 |
workflow_dispatch:
|
| 10 |
|
| 11 |
env:
|
|
|
|
| 24 |
- uses: actions/checkout@v3
|
| 25 |
- uses: actions/setup-python@v4
|
| 26 |
with:
|
| 27 |
+
python-version: '3.11.2'
|
| 28 |
cache: 'pip'
|
| 29 |
- name: Brain - Install
|
| 30 |
run: pip install -r requirements.txt
|
|
|
|
| 35 |
with:
|
| 36 |
# Sauce Labs Credentials.
|
| 37 |
sauce-username: ${{ secrets.SAUCE_USERNAME }}
|
| 38 |
+
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
|
.github/workflows/lint.yml
CHANGED
|
@@ -4,6 +4,7 @@ on:
|
|
| 4 |
pull_request:
|
| 5 |
paths:
|
| 6 |
- "Brain/**"
|
|
|
|
| 7 |
workflow_dispatch:
|
| 8 |
|
| 9 |
jobs:
|
|
|
|
| 4 |
pull_request:
|
| 5 |
paths:
|
| 6 |
- "Brain/**"
|
| 7 |
+
- "requirements.txt"
|
| 8 |
workflow_dispatch:
|
| 9 |
|
| 10 |
jobs:
|
.gitignore
CHANGED
|
@@ -1,5 +1,9 @@
|
|
| 1 |
/Brain/firebase_cred.json
|
| 2 |
-
|
|
|
|
| 3 |
Brain/firebase_cred.json
|
| 4 |
Brain/logs/*
|
| 5 |
**/.DS_Store
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
/Brain/firebase_cred.json
|
| 2 |
+
.idea
|
| 3 |
+
.vscode
|
| 4 |
Brain/firebase_cred.json
|
| 5 |
Brain/logs/*
|
| 6 |
**/.DS_Store
|
| 7 |
+
**/__pycache__
|
| 8 |
+
**/google-services.json
|
| 9 |
+
brain.egg-info
|
Brain/src/rising_plugin/gmail/email_plugin.py
CHANGED
|
@@ -11,7 +11,6 @@ from email.header import decode_header
|
|
| 11 |
from email.message import EmailMessage
|
| 12 |
from socket import socket
|
| 13 |
|
| 14 |
-
import socks
|
| 15 |
from bs4 import BeautifulSoup
|
| 16 |
|
| 17 |
from Brain.src.common.utils import PROXY_IP, PROXY_PORT
|
|
@@ -284,8 +283,6 @@ class EmailPlugin:
|
|
| 284 |
self, imap_folder: str, email_sender: str, email_password: str
|
| 285 |
) -> imaplib.IMAP4_SSL:
|
| 286 |
# Create a new socket object for later connections as a proxy
|
| 287 |
-
# socks.set_default_proxy(socks.SOCKS5, PROXY_IP, PROXY_PORT)
|
| 288 |
-
# socket.socket = socks.socksocket
|
| 289 |
|
| 290 |
# IMAP Server Connect
|
| 291 |
imap_server = EMAIL_IMAP_SERVER
|
|
|
|
| 11 |
from email.message import EmailMessage
|
| 12 |
from socket import socket
|
| 13 |
|
|
|
|
| 14 |
from bs4 import BeautifulSoup
|
| 15 |
|
| 16 |
from Brain.src.common.utils import PROXY_IP, PROXY_PORT
|
|
|
|
| 283 |
self, imap_folder: str, email_sender: str, email_password: str
|
| 284 |
) -> imaplib.IMAP4_SSL:
|
| 285 |
# Create a new socket object for later connections as a proxy
|
|
|
|
|
|
|
| 286 |
|
| 287 |
# IMAP Server Connect
|
| 288 |
imap_server = EMAIL_IMAP_SERVER
|
README.md
CHANGED
|
@@ -6,7 +6,7 @@ colorTo: indigo
|
|
| 6 |
app_file: app.py
|
| 7 |
sdk: gradio
|
| 8 |
sdk_version: 2.9.1
|
| 9 |
-
python_version: 3.
|
| 10 |
pinned: false
|
| 11 |
license: other
|
| 12 |
---
|
|
|
|
| 6 |
app_file: app.py
|
| 7 |
sdk: gradio
|
| 8 |
sdk_version: 2.9.1
|
| 9 |
+
python_version: 3.11.2
|
| 10 |
pinned: false
|
| 11 |
license: other
|
| 12 |
---
|
app.py
CHANGED
|
@@ -3,7 +3,6 @@ from fastapi import FastAPI
|
|
| 3 |
from fastapi.middleware.cors import CORSMiddleware
|
| 4 |
import uvicorn
|
| 5 |
|
| 6 |
-
# from Brain.src.gradio_debug import debug_send_notification
|
| 7 |
from Brain.src.router.browser_router import construct_blueprint_browser_api
|
| 8 |
from Brain.src.router.train_router import construct_blueprint_train_api
|
| 9 |
from Brain.src.router.email_router import construct_blueprint_email_api
|
|
@@ -31,13 +30,5 @@ app.include_router(
|
|
| 31 |
app.include_router(construct_blueprint_train_api(), prefix="/train", tags=["ai_train"])
|
| 32 |
app.include_router(construct_blueprint_email_api(), prefix="/email", tags=["ai_email"])
|
| 33 |
|
| 34 |
-
# gradio
|
| 35 |
-
|
| 36 |
-
# CUSTOM_PATH = "/gradio"
|
| 37 |
-
#
|
| 38 |
-
# app = gr.mount_gradio_app(
|
| 39 |
-
# app, debug_send_notification, path=f"{CUSTOM_PATH}/sendNotification"
|
| 40 |
-
# )
|
| 41 |
-
|
| 42 |
if __name__ == "__main__":
|
| 43 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
|
| 3 |
from fastapi.middleware.cors import CORSMiddleware
|
| 4 |
import uvicorn
|
| 5 |
|
|
|
|
| 6 |
from Brain.src.router.browser_router import construct_blueprint_browser_api
|
| 7 |
from Brain.src.router.train_router import construct_blueprint_train_api
|
| 8 |
from Brain.src.router.email_router import construct_blueprint_email_api
|
|
|
|
| 30 |
app.include_router(construct_blueprint_train_api(), prefix="/train", tags=["ai_train"])
|
| 31 |
app.include_router(construct_blueprint_email_api(), prefix="/email", tags=["ai_email"])
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
if __name__ == "__main__":
|
| 34 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
requirements.txt
CHANGED
|
@@ -1,79 +1,22 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
firebase-admin==6.1.0
|
| 24 |
-
fastapi==0.95.0
|
| 25 |
-
uvicorn==0.21.1
|
| 26 |
-
frozenlist==1.3.3
|
| 27 |
-
google-api-core==2.11.0
|
| 28 |
-
google-api-python-client==2.90.0
|
| 29 |
-
google-auth==2.17.3
|
| 30 |
-
google-auth-httplib2==0.1.0
|
| 31 |
-
google-cloud-core==2.3.2
|
| 32 |
-
google-cloud-firestore==2.11.0
|
| 33 |
-
google-cloud-storage==2.8.0
|
| 34 |
-
google-crc32c==1.5.0
|
| 35 |
-
google-resumable-media==2.4.1
|
| 36 |
-
googleapis-common-protos==1.59.0
|
| 37 |
-
gptcache==0.1.10
|
| 38 |
-
greenlet==2.0.2
|
| 39 |
-
grpcio==1.53.0
|
| 40 |
-
grpcio-status==1.53.0
|
| 41 |
-
gunicorn==20.1.0
|
| 42 |
-
httplib2==0.22.0
|
| 43 |
-
idna==3.4
|
| 44 |
-
iniconfig==2.0.0
|
| 45 |
-
isort==5.12.0
|
| 46 |
-
itsdangerous==2.1.2
|
| 47 |
-
Jinja2==3.1.2
|
| 48 |
-
lazy-object-proxy==1.9.0
|
| 49 |
-
loguru==0.7.0
|
| 50 |
-
MarkupSafe==2.1.2
|
| 51 |
-
marshmallow==3.19.0
|
| 52 |
-
marshmallow-enum==1.5.1
|
| 53 |
-
mccabe==0.7.0
|
| 54 |
-
msgpack==1.0.5
|
| 55 |
-
multidict==6.0.4
|
| 56 |
-
mypy-extensions==1.0.0
|
| 57 |
-
numexpr==2.8.4
|
| 58 |
-
numpy==1.24.2
|
| 59 |
-
openai==0.27.4
|
| 60 |
-
openapi-schema-pydantic>=1.2.4
|
| 61 |
-
packaging==23.1
|
| 62 |
-
pathspec==0.11.1
|
| 63 |
-
pinecone-client==2.2.1
|
| 64 |
-
platformdirs==3.2.0
|
| 65 |
-
pluggy==1.0.0
|
| 66 |
-
proto-plus==1.22.2
|
| 67 |
-
win32-setctime==1.1.0
|
| 68 |
-
wrapt==1.15.0
|
| 69 |
-
yarl==1.8.2
|
| 70 |
-
twilio==8.2.1
|
| 71 |
-
nemoguardrails==0.2.0
|
| 72 |
-
user-agents==2.2.0
|
| 73 |
-
faiss-cpu==1.7.4
|
| 74 |
-
google-search-results==2.4.2
|
| 75 |
-
tiktoken==0.4.0
|
| 76 |
-
tiktoken==0.4.0
|
| 77 |
-
gradio-client==0.2.7
|
| 78 |
-
gradio==3.14.0
|
| 79 |
-
PySocks==1.7.1
|
|
|
|
| 1 |
+
bs4
|
| 2 |
+
colorama
|
| 3 |
+
gradio
|
| 4 |
+
faiss-cpu
|
| 5 |
+
fastapi
|
| 6 |
+
firebase
|
| 7 |
+
firebase-admin
|
| 8 |
+
langchain
|
| 9 |
+
marshmallow
|
| 10 |
+
nemoguardrails
|
| 11 |
+
openai
|
| 12 |
+
pinecone-client
|
| 13 |
+
replicate
|
| 14 |
+
socks
|
| 15 |
+
twilio
|
| 16 |
+
user_agents
|
| 17 |
+
uvicorn
|
| 18 |
+
|
| 19 |
+
black
|
| 20 |
+
pytest
|
| 21 |
+
pytest-cov
|
| 22 |
+
pytest-xdist
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
runtime.txt
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
python-3.
|
|
|
|
| 1 |
+
python-3.11.2
|