Joshua Sundance Bailey
commited on
Commit
·
c21a491
0
Parent(s):
initial commit
Browse files- .env-example +18 -0
- .github/ISSUE_TEMPLATE/bug_report.md +38 -0
- .github/ISSUE_TEMPLATE/feature_request.md +17 -0
- .github/dependabot.yml +11 -0
- .github/pull_request_template.md +12 -0
- .gitignore +91 -0
- .idea/.gitignore +8 -0
- .idea/AI_chatbot.iml +8 -0
- .idea/inspectionProfiles/Project_Default.xml +21 -0
- .idea/inspectionProfiles/profiles_settings.xml +6 -0
- .idea/misc.xml +4 -0
- .idea/modules.xml +8 -0
- .idea/vcs.xml +6 -0
- .pre-commit-config.yaml +63 -0
- Dockerfile +13 -0
- README.md +0 -0
- docker-compose.yml +14 -0
- pyproject.toml +0 -0
- requirements.txt +6 -0
.env-example
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
JUPYTER_PORT=8181
|
2 |
+
|
3 |
+
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
|
4 |
+
LANGCHAIN_API_KEY=...
|
5 |
+
LANGCHAIN_TRACING_V2="true"
|
6 |
+
LANGCHAIN_PROJECT="AI_GIS_language"
|
7 |
+
|
8 |
+
ANYSCALE_API_KEY=...
|
9 |
+
OPENAI_API_KEY=sk-...
|
10 |
+
ANTHROPIC_API_KEY=...
|
11 |
+
|
12 |
+
#https://github.com/streamlit/app-starter-kit
|
13 |
+
#https://github.com/langchain-ai/streamlit-agent
|
14 |
+
#https://github.com/hwchase17/langchain-streamlit-template
|
15 |
+
#https://github.com/dataprofessor/langchain-ask-the-doc
|
16 |
+
#https://github.com/dataprofessor/langchain-ask-the-data
|
17 |
+
#https://github.com/dataprofessor/langchain-blog-outline-generator
|
18 |
+
#https://github.com/dataprofessor/langchain-text-summarization
|
.github/ISSUE_TEMPLATE/bug_report.md
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Bug report
|
3 |
+
about: Create a report to help us improve
|
4 |
+
title: ''
|
5 |
+
labels: bug
|
6 |
+
assignees: ''
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
**Describe the bug**
|
11 |
+
A clear and concise description of what the bug is.
|
12 |
+
|
13 |
+
**To Reproduce**
|
14 |
+
Steps to reproduce the behavior:
|
15 |
+
1. Go to '...'
|
16 |
+
2. Click on '....'
|
17 |
+
3. Scroll down to '....'
|
18 |
+
4. See error
|
19 |
+
|
20 |
+
**Expected behavior**
|
21 |
+
A clear and concise description of what you expected to happen.
|
22 |
+
|
23 |
+
**Screenshots**
|
24 |
+
If applicable, add screenshots to help explain your problem.
|
25 |
+
|
26 |
+
**Desktop (please complete the following information):**
|
27 |
+
- OS: [e.g. iOS]
|
28 |
+
- Browser [e.g. chrome, safari]
|
29 |
+
- Version [e.g. 22]
|
30 |
+
|
31 |
+
**Smartphone (please complete the following information):**
|
32 |
+
- Device: [e.g. iPhone6]
|
33 |
+
- OS: [e.g. iOS8.1]
|
34 |
+
- Browser [e.g. stock browser, safari]
|
35 |
+
- Version [e.g. 22]
|
36 |
+
|
37 |
+
**Additional context**
|
38 |
+
Add any other context about the problem here.
|
.github/ISSUE_TEMPLATE/feature_request.md
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
name: Feature request
|
3 |
+
about: Suggest an idea for this project
|
4 |
+
title: ''
|
5 |
+
labels: enhancement
|
6 |
+
assignees: ''
|
7 |
+
|
8 |
+
---
|
9 |
+
|
10 |
+
**Describe the solution you'd like**
|
11 |
+
A clear and concise description of what you want to happen.
|
12 |
+
|
13 |
+
**Describe alternatives you've considered**
|
14 |
+
A clear and concise description of any alternative solutions or features you've considered.
|
15 |
+
|
16 |
+
**Additional context**
|
17 |
+
Add any other context or screenshots about the feature request here.
|
.github/dependabot.yml
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# To get started with Dependabot version updates, you'll need to specify which
|
2 |
+
# package ecosystems to update and where the package manifests are located.
|
3 |
+
# Please see the documentation for all configuration options:
|
4 |
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5 |
+
|
6 |
+
version: 2
|
7 |
+
updates:
|
8 |
+
- package-ecosystem: "pip" # See documentation for possible values
|
9 |
+
directory: "/" # Location of package manifests
|
10 |
+
schedule:
|
11 |
+
interval: "weekly"
|
.github/pull_request_template.md
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Thank you for contributing to `AI_chatbot`.
|
2 |
+
Before submitting this PR, please make sure:
|
3 |
+
|
4 |
+
- [ ] Your code builds clean without any errors or warnings
|
5 |
+
- [ ] Your code doesn't break anything we can't fix
|
6 |
+
- [ ] You have added appropriate tests
|
7 |
+
|
8 |
+
Please check one or more of the following to describe the nature of this PR:
|
9 |
+
- [ ] New feature
|
10 |
+
- [ ] Bug fix
|
11 |
+
- [ ] Documentation
|
12 |
+
- [ ] Other
|
.gitignore
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*$py.class
|
2 |
+
*.chainlit
|
3 |
+
*.chroma
|
4 |
+
*.cover
|
5 |
+
*.egg
|
6 |
+
*.egg-info/
|
7 |
+
*.env
|
8 |
+
*.langchain.db
|
9 |
+
*.log
|
10 |
+
*.manifest
|
11 |
+
*.mo
|
12 |
+
*.pot
|
13 |
+
*.py,cover
|
14 |
+
*.py[cod]
|
15 |
+
*.sage.py
|
16 |
+
*.so
|
17 |
+
*.spec
|
18 |
+
.DS_STORE
|
19 |
+
.Python
|
20 |
+
.cache
|
21 |
+
.coverage
|
22 |
+
.coverage.*
|
23 |
+
.dmypy.json
|
24 |
+
.dockerignore
|
25 |
+
.eggs/
|
26 |
+
.env
|
27 |
+
.hypothesis/
|
28 |
+
.installed.cfg
|
29 |
+
.ipynb_checkpoints
|
30 |
+
.mypy_cache/
|
31 |
+
.nox/
|
32 |
+
.pyre/
|
33 |
+
.pytest_cache/
|
34 |
+
.python-version
|
35 |
+
.ropeproject
|
36 |
+
.ruff_cache/
|
37 |
+
.scrapy
|
38 |
+
.spyderproject
|
39 |
+
.spyproject
|
40 |
+
.tox/
|
41 |
+
.venv
|
42 |
+
.vscode
|
43 |
+
.webassets-cache
|
44 |
+
/site
|
45 |
+
ENV/
|
46 |
+
MANIFEST
|
47 |
+
__pycache__
|
48 |
+
__pycache__/
|
49 |
+
__pypackages__/
|
50 |
+
build/
|
51 |
+
celerybeat-schedule
|
52 |
+
celerybeat.pid
|
53 |
+
coverage.xml
|
54 |
+
credentials.json
|
55 |
+
data/
|
56 |
+
db.sqlite3
|
57 |
+
db.sqlite3-journal
|
58 |
+
develop-eggs/
|
59 |
+
dist/
|
60 |
+
dmypy.json
|
61 |
+
docs/_build/
|
62 |
+
downloads/
|
63 |
+
eggs/
|
64 |
+
env.bak/
|
65 |
+
env/
|
66 |
+
fly.toml
|
67 |
+
htmlcov/
|
68 |
+
instance/
|
69 |
+
ipython_config.py
|
70 |
+
junk/
|
71 |
+
lib/
|
72 |
+
lib64/
|
73 |
+
local_settings.py
|
74 |
+
models/*.bin
|
75 |
+
nosetests.xml
|
76 |
+
notebooks/scratch/
|
77 |
+
parts/
|
78 |
+
pip-delete-this-directory.txt
|
79 |
+
pip-log.txt
|
80 |
+
pip-wheel-metadata/
|
81 |
+
profile_default/
|
82 |
+
sdist/
|
83 |
+
share/python-wheels/
|
84 |
+
storage
|
85 |
+
target/
|
86 |
+
token.json
|
87 |
+
var/
|
88 |
+
venv
|
89 |
+
venv.bak/
|
90 |
+
venv/
|
91 |
+
wheels/
|
.idea/.gitignore
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Default ignored files
|
2 |
+
/shelf/
|
3 |
+
/workspace.xml
|
4 |
+
# Editor-based HTTP Client requests
|
5 |
+
/httpRequests/
|
6 |
+
# Datasource local storage ignored files
|
7 |
+
/dataSources/
|
8 |
+
/dataSources.local.xml
|
.idea/AI_chatbot.iml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<module type="PYTHON_MODULE" version="4">
|
3 |
+
<component name="NewModuleRootManager">
|
4 |
+
<content url="file://$MODULE_DIR$" />
|
5 |
+
<orderEntry type="inheritedJdk" />
|
6 |
+
<orderEntry type="sourceFolder" forTests="false" />
|
7 |
+
</component>
|
8 |
+
</module>
|
.idea/inspectionProfiles/Project_Default.xml
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<component name="InspectionProjectProfileManager">
|
2 |
+
<profile version="1.0">
|
3 |
+
<option name="myName" value="Project Default" />
|
4 |
+
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
5 |
+
<inspection_tool class="InconsistentLineSeparators" enabled="true" level="WARNING" enabled_by_default="true" />
|
6 |
+
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
7 |
+
<option name="ourVersions">
|
8 |
+
<value>
|
9 |
+
<list size="5">
|
10 |
+
<item index="0" class="java.lang.String" itemvalue="3.12" />
|
11 |
+
<item index="1" class="java.lang.String" itemvalue="3.8" />
|
12 |
+
<item index="2" class="java.lang.String" itemvalue="3.9" />
|
13 |
+
<item index="3" class="java.lang.String" itemvalue="3.10" />
|
14 |
+
<item index="4" class="java.lang.String" itemvalue="3.11" />
|
15 |
+
</list>
|
16 |
+
</value>
|
17 |
+
</option>
|
18 |
+
</inspection_tool>
|
19 |
+
<inspection_tool class="PyShadowingNamesInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
20 |
+
</profile>
|
21 |
+
</component>
|
.idea/inspectionProfiles/profiles_settings.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<component name="InspectionProjectProfileManager">
|
2 |
+
<settings>
|
3 |
+
<option name="USE_PROJECT_PROFILE" value="false" />
|
4 |
+
<version value="1.0" />
|
5 |
+
</settings>
|
6 |
+
</component>
|
.idea/misc.xml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="ProjectRootManager" version="2" project-jdk-name="arcgis-pc (2)" project-jdk-type="Python SDK" />
|
4 |
+
</project>
|
.idea/modules.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="ProjectModuleManager">
|
4 |
+
<modules>
|
5 |
+
<module fileurl="file://$PROJECT_DIR$/.idea/AI_chatbot.iml" filepath="$PROJECT_DIR$/.idea/AI_chatbot.iml" />
|
6 |
+
</modules>
|
7 |
+
</component>
|
8 |
+
</project>
|
.idea/vcs.xml
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<project version="4">
|
3 |
+
<component name="VcsDirectoryMappings">
|
4 |
+
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
5 |
+
</component>
|
6 |
+
</project>
|
.pre-commit-config.yaml
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Don't know what this file is? See https://pre-commit.com/
|
2 |
+
# pip install pre-commit
|
3 |
+
# pre-commit install
|
4 |
+
# pre-commit autoupdate
|
5 |
+
# Apply to all files without commiting:
|
6 |
+
# pre-commit run --all-files
|
7 |
+
# I recommend running this until you pass all checks, and then commit.
|
8 |
+
# Fix what you need to and then let the pre-commit hooks resolve their conflicts.
|
9 |
+
# You may need to git add -u between runs.
|
10 |
+
exclude: "(.idea)|(docs)"
|
11 |
+
repos:
|
12 |
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
13 |
+
rev: "v0.0.290"
|
14 |
+
hooks:
|
15 |
+
- id: ruff
|
16 |
+
args: [--fix, --exit-non-zero-on-fix, --ignore, E501]
|
17 |
+
- repo: https://github.com/koalaman/shellcheck-precommit
|
18 |
+
rev: v0.9.0
|
19 |
+
hooks:
|
20 |
+
- id: shellcheck
|
21 |
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
22 |
+
rev: v4.4.0
|
23 |
+
hooks:
|
24 |
+
- id: check-ast
|
25 |
+
- id: check-builtin-literals
|
26 |
+
- id: check-merge-conflict
|
27 |
+
- id: check-symlinks
|
28 |
+
- id: check-toml
|
29 |
+
- id: check-xml
|
30 |
+
- id: debug-statements
|
31 |
+
- id: check-case-conflict
|
32 |
+
- id: check-docstring-first
|
33 |
+
- id: check-executables-have-shebangs
|
34 |
+
- id: check-json
|
35 |
+
- id: check-yaml
|
36 |
+
- id: debug-statements
|
37 |
+
- id: fix-byte-order-marker
|
38 |
+
- id: detect-private-key
|
39 |
+
- id: end-of-file-fixer
|
40 |
+
- id: trailing-whitespace
|
41 |
+
- id: mixed-line-ending
|
42 |
+
- id: requirements-txt-fixer
|
43 |
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
44 |
+
rev: v1.5.1
|
45 |
+
hooks:
|
46 |
+
- id: mypy
|
47 |
+
- repo: https://github.com/asottile/add-trailing-comma
|
48 |
+
rev: v3.1.0
|
49 |
+
hooks:
|
50 |
+
- id: add-trailing-comma
|
51 |
+
- repo: https://github.com/dannysepler/rm_unneeded_f_str
|
52 |
+
rev: v0.2.0
|
53 |
+
hooks:
|
54 |
+
- id: rm-unneeded-f-str
|
55 |
+
- repo: https://github.com/psf/black
|
56 |
+
rev: 23.9.1
|
57 |
+
hooks:
|
58 |
+
- id: black
|
59 |
+
- repo: https://github.com/PyCQA/bandit
|
60 |
+
rev: 1.7.5
|
61 |
+
hooks:
|
62 |
+
- id: bandit
|
63 |
+
args: ["-x", "tests/*.py"]
|
Dockerfile
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.11-slim-buster
|
2 |
+
|
3 |
+
RUN adduser --uid 1001 --disabled-password --gecos '' appuser
|
4 |
+
USER 1001
|
5 |
+
|
6 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
7 |
+
PYTHONUNBUFFERED=1
|
8 |
+
|
9 |
+
RUN pip install --user --upgrade pip
|
10 |
+
COPY ./requirements.txt /home/appuser/app/requirements.txt
|
11 |
+
RUN pip install --user -r /home/appuser/app/requirements.txt
|
12 |
+
|
13 |
+
CMD ["/bin/bash"]
|
README.md
ADDED
File without changes
|
docker-compose.yml
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
version: '3.8'
|
2 |
+
|
3 |
+
services:
|
4 |
+
streamlit-chat:
|
5 |
+
image: streamlit-chat:latest
|
6 |
+
build: .
|
7 |
+
env_file:
|
8 |
+
- .env
|
9 |
+
ports:
|
10 |
+
- "8000:8000"
|
11 |
+
volumes:
|
12 |
+
- .:/home/appuser/app:rw
|
13 |
+
working_dir: /home/appuser/app/
|
14 |
+
entrypoint: ["streamlit", "run", "${APP}", "-w"]
|
pyproject.toml
ADDED
File without changes
|
requirements.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
anthropic
|
2 |
+
langchain
|
3 |
+
langsmith
|
4 |
+
openai
|
5 |
+
streamlit
|
6 |
+
tiktoken
|