├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── .gitignore
├── .pre-commit-config.yaml
├── LICENSE
├── README.md
├── constants.py
├── example.env
├── ingest.py
├── poetry.lock
├── privateGPT.py
├── pyproject.toml
├── requirements.txt
└── source_documents
└── state_of_the_union.txt
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
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 | Note: if you'd like to *ask a question* or *open a discussion*, head over to the [Discussions](https://github.com/imartinez/privateGPT/discussions) section and post it there.
11 |
12 | **Describe the bug and how to reproduce it**
13 | A clear and concise description of what the bug is and the steps to reproduce the behavior.
14 |
15 | **Expected behavior**
16 | A clear and concise description of what you expected to happen.
17 |
18 | **Environment (please complete the following information):**
19 | - OS / hardware: [e.g. macOS 12.6 / M1]
20 | - Python version [e.g. 3.11.3]
21 | - Other relevant information
22 |
23 | **Additional context**
24 | Add any other context about the problem here.
25 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | Note: if you'd like to *ask a question* or *open a discussion*, head over to the [Discussions](https://github.com/imartinez/privateGPT/discussions) section and post it there.
11 |
12 | **Is your feature request related to a problem? Please describe.**
13 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
14 |
15 | **Describe the solution you'd like**
16 | A clear and concise description of what you want to happen.
17 |
18 | **Describe alternatives you've considered**
19 | A clear and concise description of any alternative solutions or features you've considered.
20 |
21 | **Additional context**
22 | Add any other context or screenshots about the feature request here.
23 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | .DS_STORE
3 |
4 | # Models
5 | models/
6 |
7 | # Local Chroma db
8 | .chroma/
9 | db/
10 |
11 | # Byte-compiled / optimized / DLL files
12 | __pycache__/
13 | *.py[cod]
14 | *$py.class
15 |
16 | # C extensions
17 | *.so
18 |
19 | # Distribution / packaging
20 | .Python
21 | build/
22 | develop-eggs/
23 | dist/
24 | downloads/
25 | eggs/
26 | .eggs/
27 | lib/
28 | lib64/
29 | parts/
30 | sdist/
31 | var/
32 | wheels/
33 | share/python-wheels/
34 | *.egg-info/
35 | .installed.cfg
36 | *.egg
37 | MANIFEST
38 |
39 | # PyInstaller
40 | # Usually these files are written by a python script from a template
41 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
42 | *.manifest
43 | *.spec
44 |
45 | # Installer logs
46 | pip-log.txt
47 | pip-delete-this-directory.txt
48 |
49 | # Unit test / coverage reports
50 | htmlcov/
51 | .tox/
52 | .nox/
53 | .coverage
54 | .coverage.*
55 | .cache
56 | nosetests.xml
57 | coverage.xml
58 | *.cover
59 | *.py,cover
60 | .hypothesis/
61 | .pytest_cache/
62 | cover/
63 |
64 | # Translations
65 | *.mo
66 | *.pot
67 |
68 | # Django stuff:
69 | *.log
70 | local_settings.py
71 | db.sqlite3
72 | db.sqlite3-journal
73 |
74 | # Flask stuff:
75 | instance/
76 | .webassets-cache
77 |
78 | # Scrapy stuff:
79 | .scrapy
80 |
81 | # Sphinx documentation
82 | docs/_build/
83 |
84 | # PyBuilder
85 | .pybuilder/
86 | target/
87 |
88 | # Jupyter Notebook
89 | .ipynb_checkpoints
90 |
91 | # IPython
92 | profile_default/
93 | ipython_config.py
94 |
95 | # pyenv
96 | # For a library or package, you might want to ignore these files since the code is
97 | # intended to run in multiple environments; otherwise, check them in:
98 | # .python-version
99 |
100 | # pipenv
101 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
102 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
103 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
104 | # install all needed dependencies.
105 | #Pipfile.lock
106 |
107 | # poetry
108 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
109 | # This is especially recommended for binary packages to ensure reproducibility, and is more
110 | # commonly ignored for libraries.
111 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
112 | #poetry.lock
113 |
114 | # pdm
115 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116 | #pdm.lock
117 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
118 | # in version control.
119 | # https://pdm.fming.dev/#use-with-ide
120 | .pdm.toml
121 |
122 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
123 | __pypackages__/
124 |
125 | # Celery stuff
126 | celerybeat-schedule
127 | celerybeat.pid
128 |
129 | # SageMath parsed files
130 | *.sage.py
131 |
132 | # Environments
133 | .env
134 | .venv
135 | env/
136 | venv/
137 | ENV/
138 | env.bak/
139 | venv.bak/
140 |
141 | # Spyder project settings
142 | .spyderproject
143 | .spyproject
144 |
145 | # Rope project settings
146 | .ropeproject
147 |
148 | # mkdocs documentation
149 | /site
150 |
151 | # mypy
152 | .mypy_cache/
153 | .dmypy.json
154 | dmypy.json
155 |
156 | # Pyre type checker
157 | .pyre/
158 |
159 | # pytype static type analyzer
160 | .pytype/
161 |
162 | # Cython debug symbols
163 | cython_debug/
164 |
165 | # PyCharm
166 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
167 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
168 | # and can be added to the global gitignore or merged into this file. For a more nuclear
169 | # option (not recommended) you can uncomment the following to ignore the entire idea folder.
170 | #.idea/
171 |
172 | .vscode/launch.json
173 | persist_directory/chroma.sqlite3
174 |
--------------------------------------------------------------------------------
/.pre-commit-config.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | files: ^(.*\.(py|json|md|sh|yaml|cfg|txt))$
3 | exclude: ^(\.[^/]*cache/.*|.*/_user.py|source_documents/)$
4 | repos:
5 | - repo: https://github.com/pre-commit/pre-commit-hooks
6 | rev: v4.4.0
7 | hooks:
8 | #- id: no-commit-to-branch
9 | # args: [--branch, main]
10 | - id: check-yaml
11 | args: [--unsafe]
12 | # - id: debug-statements
13 | - id: end-of-file-fixer
14 | - id: trailing-whitespace
15 | exclude-files: \.md$
16 | - id: check-json
17 | - id: mixed-line-ending
18 | # - id: check-builtin-literals
19 | # - id: check-ast
20 | - id: check-merge-conflict
21 | - id: check-executables-have-shebangs
22 | - id: check-shebang-scripts-are-executable
23 | - id: check-docstring-first
24 | - id: fix-byte-order-marker
25 | - id: check-case-conflict
26 | # - id: check-toml
27 | - repo: https://github.com/adrienverge/yamllint.git
28 | rev: v1.29.0
29 | hooks:
30 | - id: yamllint
31 | args:
32 | - --no-warnings
33 | - -d
34 | - '{extends: relaxed, rules: {line-length: {max: 90}}}'
35 | - repo: https://github.com/codespell-project/codespell
36 | rev: v2.2.2
37 | hooks:
38 | - id: codespell
39 | args:
40 | # - --builtin=clear,rare,informal,usage,code,names,en-GB_to_en-US
41 | - --builtin=clear,rare,informal,usage,code,names
42 | - --ignore-words-list=hass,master
43 | - --skip="./.*"
44 | - --quiet-level=2
45 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # privateGPT
2 | Ask questions to your documents without an internet connection, using the power of LLMs. 100% private, no data leaves your execution environment at any point. You can ingest documents and ask questions without an internet connection!
3 |
4 | Built with [LangChain](https://github.com/hwchase17/langchain), [GPT4All](https://github.com/nomic-ai/gpt4all), [LlamaCpp](https://github.com/ggerganov/llama.cpp), [Chroma](https://www.trychroma.com/) and [SentenceTransformers](https://www.sbert.net/).
5 |
6 |
7 |
8 | # Environment Setup
9 | In order to set your environment up to run the code here, first install all requirements:
10 |
11 | ```shell
12 | pip3 install -r requirements.txt
13 | ```
14 |
15 | *Alternative requirements installation with poetry*
16 | 1. Install [poetry](https://python-poetry.org/docs/#installation)
17 |
18 | 2. Run this commands
19 | ```shell
20 | cd privateGPT
21 | poetry install
22 | poetry shell
23 | ```
24 |
25 | Then, download the LLM model and place it in a directory of your choice:
26 | - LLM: default to [ggml-gpt4all-j-v1.3-groovy.bin](https://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.bin). If you prefer a different GPT4All-J compatible model, just download it and reference it in your `.env` file.
27 |
28 | Copy the `example.env` template into `.env`
29 | ```shell
30 | cp example.env .env
31 | ```
32 |
33 | and edit the variables appropriately in the `.env` file.
34 | ```
35 | MODEL_TYPE: supports LlamaCpp or GPT4All
36 | PERSIST_DIRECTORY: is the folder you want your vectorstore in
37 | MODEL_PATH: Path to your GPT4All or LlamaCpp supported LLM
38 | MODEL_N_CTX: Maximum token limit for the LLM model
39 | MODEL_N_BATCH: Number of tokens in the prompt that are fed into the model at a time. Optimal value differs a lot depending on the model (8 works well for GPT4All, and 1024 is better for LlamaCpp)
40 | EMBEDDINGS_MODEL_NAME: SentenceTransformers embeddings model name (see https://www.sbert.net/docs/pretrained_models.html)
41 | TARGET_SOURCE_CHUNKS: The amount of chunks (sources) that will be used to answer a question
42 | ```
43 |
44 | Note: because of the way `langchain` loads the `SentenceTransformers` embeddings, the first time you run the script it will require internet connection to download the embeddings model itself.
45 |
46 | ## Test dataset
47 | This repo uses a [state of the union transcript](https://github.com/imartinez/privateGPT/blob/main/source_documents/state_of_the_union.txt) as an example.
48 |
49 | ## Instructions for ingesting your own dataset
50 |
51 | Put any and all your files into the `source_documents` directory
52 |
53 | The supported extensions are:
54 |
55 | - `.csv`: CSV,
56 | - `.docx`: Word Document,
57 | - `.doc`: Word Document,
58 | - `.enex`: EverNote,
59 | - `.eml`: Email,
60 | - `.epub`: EPub,
61 | - `.html`: HTML File,
62 | - `.md`: Markdown,
63 | - `.msg`: Outlook Message,
64 | - `.odt`: Open Document Text,
65 | - `.pdf`: Portable Document Format (PDF),
66 | - `.pptx` : PowerPoint Document,
67 | - `.ppt` : PowerPoint Document,
68 | - `.txt`: Text file (UTF-8),
69 |
70 | Run the following command to ingest all the data.
71 |
72 | ```shell
73 | python ingest.py
74 | ```
75 |
76 | Output should look like this:
77 |
78 | ```shell
79 | Creating new vectorstore
80 | Loading documents from source_documents
81 | Loading new documents: 100%|██████████████████████| 1/1 [00:01<00:00, 1.73s/it]
82 | Loaded 1 new documents from source_documents
83 | Split into 90 chunks of text (max. 500 tokens each)
84 | Creating embeddings. May take some minutes...
85 | Using embedded DuckDB with persistence: data will be stored in: db
86 | Ingestion complete! You can now run privateGPT.py to query your documents
87 | ```
88 |
89 | It will create a `db` folder containing the local vectorstore. Will take 20-30 seconds per document, depending on the size of the document.
90 | You can ingest as many documents as you want, and all will be accumulated in the local embeddings database.
91 | If you want to start from an empty database, delete the `db` folder.
92 |
93 | Note: during the ingest process no data leaves your local environment. You could ingest without an internet connection, except for the first time you run the ingest script, when the embeddings model is downloaded.
94 |
95 | ## Ask questions to your documents, locally!
96 | In order to ask a question, run a command like:
97 |
98 | ```shell
99 | python privateGPT.py
100 | ```
101 |
102 | And wait for the script to require your input.
103 |
104 | ```plaintext
105 | > Enter a query:
106 | ```
107 |
108 | Hit enter. You'll need to wait 20-30 seconds (depending on your machine) while the LLM model consumes the prompt and prepares the answer. Once done, it will print the answer and the 4 sources it used as context from your documents; you can then ask another question without re-running the script, just wait for the prompt again.
109 |
110 | Note: you could turn off your internet connection, and the script inference would still work. No data gets out of your local environment.
111 |
112 | Type `exit` to finish the script.
113 |
114 |
115 | ### CLI
116 | The script also supports optional command-line arguments to modify its behavior. You can see a full list of these arguments by running the command ```python privateGPT.py --help``` in your terminal.
117 |
118 |
119 | # How does it work?
120 | Selecting the right local models and the power of `LangChain` you can run the entire pipeline locally, without any data leaving your environment, and with reasonable performance.
121 |
122 | - `ingest.py` uses `LangChain` tools to parse the document and create embeddings locally using `HuggingFaceEmbeddings` (`SentenceTransformers`). It then stores the result in a local vector database using `Chroma` vector store.
123 | - `privateGPT.py` uses a local LLM based on `GPT4All-J` or `LlamaCpp` to understand questions and create answers. The context for the answers is extracted from the local vector store using a similarity search to locate the right piece of context from the docs.
124 | - `GPT4All-J` wrapper was introduced in LangChain 0.0.162.
125 |
126 | # System Requirements
127 |
128 | ## Python Version
129 | To use this software, you must have Python 3.10 or later installed. Earlier versions of Python will not compile.
130 |
131 | ## C++ Compiler
132 | If you encounter an error while building a wheel during the `pip install` process, you may need to install a C++ compiler on your computer.
133 |
134 | ### For Windows 10/11
135 | To install a C++ compiler on Windows 10/11, follow these steps:
136 |
137 | 1. Install Visual Studio 2022.
138 | 2. Make sure the following components are selected:
139 | * Universal Windows Platform development
140 | * C++ CMake tools for Windows
141 | 3. Download the MinGW installer from the [MinGW website](https://sourceforge.net/projects/mingw/).
142 | 4. Run the installer and select the `gcc` component.
143 |
144 | ## Mac Running Intel
145 | When running a Mac with Intel hardware (not M1), you may run into _clang: error: the clang compiler does not support '-march=native'_ during pip install.
146 |
147 | If so set your archflags during pip install. eg: _ARCHFLAGS="-arch x86_64" pip3 install -r requirements.txt_
148 |
149 | # Disclaimer
150 | This is a test project to validate the feasibility of a fully private solution for question answering using LLMs and Vector embeddings. It is not production ready, and it is not meant to be used in production. The models selection is not optimized for performance, but for privacy; but it is possible to use different models and vectorstores to improve performance.
151 |
--------------------------------------------------------------------------------
/constants.py:
--------------------------------------------------------------------------------
1 | import os
2 | from dotenv import load_dotenv
3 | from chromadb.config import Settings
4 |
5 | load_dotenv()
6 |
7 | # Define the folder for storing database
8 | PERSIST_DIRECTORY = os.environ.get('PERSIST_DIRECTORY')
9 | if PERSIST_DIRECTORY is None:
10 | raise Exception("Please set the PERSIST_DIRECTORY environment variable")
11 |
12 | # Define the Chroma settings
13 | CHROMA_SETTINGS = Settings(
14 | persist_directory=PERSIST_DIRECTORY,
15 | anonymized_telemetry=False
16 | )
17 |
--------------------------------------------------------------------------------
/example.env:
--------------------------------------------------------------------------------
1 | PERSIST_DIRECTORY=db
2 | MODEL_TYPE=GPT4All
3 | MODEL_PATH=models/ggml-gpt4all-j-v1.3-groovy.bin
4 | EMBEDDINGS_MODEL_NAME=all-MiniLM-L6-v2
5 | MODEL_N_CTX=1000
6 | OPENAI_API_BASE=http://localhost:8080/v1
7 | MODEL_N_BATCH=8
8 | TARGET_SOURCE_CHUNKS=4
9 |
--------------------------------------------------------------------------------
/ingest.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | import os
3 | import glob
4 | from typing import List
5 | from dotenv import load_dotenv
6 | from multiprocessing import Pool
7 | from tqdm import tqdm
8 |
9 | from langchain.document_loaders import (
10 | CSVLoader,
11 | EverNoteLoader,
12 | PyMuPDFLoader,
13 | TextLoader,
14 | UnstructuredEmailLoader,
15 | UnstructuredEPubLoader,
16 | UnstructuredHTMLLoader,
17 | UnstructuredMarkdownLoader,
18 | UnstructuredODTLoader,
19 | UnstructuredPowerPointLoader,
20 | UnstructuredWordDocumentLoader,
21 | )
22 |
23 | from langchain.text_splitter import RecursiveCharacterTextSplitter
24 | from langchain.vectorstores import Chroma
25 | from langchain.embeddings import HuggingFaceEmbeddings
26 | from langchain.docstore.document import Document
27 |
28 | if not load_dotenv():
29 | print("Could not load .env file or it is empty. Please check if it exists and is readable.")
30 | exit(1)
31 |
32 | from constants import CHROMA_SETTINGS
33 | import chromadb
34 |
35 | # Load environment variables
36 | persist_directory = os.environ.get('PERSIST_DIRECTORY')
37 | source_directory = os.environ.get('SOURCE_DIRECTORY', 'source_documents')
38 | embeddings_model_name = os.environ.get('EMBEDDINGS_MODEL_NAME')
39 | chunk_size = 500
40 | chunk_overlap = 50
41 |
42 |
43 | # Custom document loaders
44 | class MyElmLoader(UnstructuredEmailLoader):
45 | """Wrapper to fallback to text/plain when default does not work"""
46 |
47 | def load(self) -> List[Document]:
48 | """Wrapper adding fallback for elm without html"""
49 | try:
50 | try:
51 | doc = UnstructuredEmailLoader.load(self)
52 | except ValueError as e:
53 | if 'text/html content not found in email' in str(e):
54 | # Try plain text
55 | self.unstructured_kwargs["content_source"]="text/plain"
56 | doc = UnstructuredEmailLoader.load(self)
57 | else:
58 | raise
59 | except Exception as e:
60 | # Add file_path to exception message
61 | raise type(e)(f"{self.file_path}: {e}") from e
62 |
63 | return doc
64 |
65 |
66 | # Map file extensions to document loaders and their arguments
67 | LOADER_MAPPING = {
68 | ".csv": (CSVLoader, {}),
69 | # ".docx": (Docx2txtLoader, {}),
70 | ".doc": (UnstructuredWordDocumentLoader, {}),
71 | ".docx": (UnstructuredWordDocumentLoader, {}),
72 | ".enex": (EverNoteLoader, {}),
73 | ".eml": (MyElmLoader, {}),
74 | ".epub": (UnstructuredEPubLoader, {}),
75 | ".html": (UnstructuredHTMLLoader, {}),
76 | ".md": (UnstructuredMarkdownLoader, {}),
77 | ".odt": (UnstructuredODTLoader, {}),
78 | ".pdf": (PyMuPDFLoader, {}),
79 | ".ppt": (UnstructuredPowerPointLoader, {}),
80 | ".pptx": (UnstructuredPowerPointLoader, {}),
81 | ".txt": (TextLoader, {"encoding": "utf8"}),
82 | # Add more mappings for other file extensions and loaders as needed
83 | }
84 |
85 |
86 | def load_single_document(file_path: str) -> List[Document]:
87 | ext = "." + file_path.rsplit(".", 1)[-1].lower()
88 | if ext in LOADER_MAPPING:
89 | loader_class, loader_args = LOADER_MAPPING[ext]
90 | loader = loader_class(file_path, **loader_args)
91 | return loader.load()
92 |
93 | raise ValueError(f"Unsupported file extension '{ext}'")
94 |
95 | def load_documents(source_dir: str, ignored_files: List[str] = []) -> List[Document]:
96 | """
97 | Loads all documents from the source documents directory, ignoring specified files
98 | """
99 | all_files = []
100 | for ext in LOADER_MAPPING:
101 | all_files.extend(
102 | glob.glob(os.path.join(source_dir, f"**/*{ext.lower()}"), recursive=True)
103 | )
104 | all_files.extend(
105 | glob.glob(os.path.join(source_dir, f"**/*{ext.upper()}"), recursive=True)
106 | )
107 | filtered_files = [file_path for file_path in all_files if file_path not in ignored_files]
108 |
109 | with Pool(processes=os.cpu_count()) as pool:
110 | results = []
111 | with tqdm(total=len(filtered_files), desc='Loading new documents', ncols=80) as pbar:
112 | for i, docs in enumerate(pool.imap_unordered(load_single_document, filtered_files)):
113 | results.extend(docs)
114 | pbar.update()
115 |
116 | return results
117 |
118 | def process_documents(ignored_files: List[str] = []) -> List[Document]:
119 | """
120 | Load documents and split in chunks
121 | """
122 | print(f"Loading documents from {source_directory}")
123 | documents = load_documents(source_directory, ignored_files)
124 | if not documents:
125 | print("No new documents to load")
126 | exit(0)
127 | print(f"Loaded {len(documents)} new documents from {source_directory}")
128 | text_splitter = RecursiveCharacterTextSplitter(chunk_size=chunk_size, chunk_overlap=chunk_overlap)
129 | texts = text_splitter.split_documents(documents)
130 | print(f"Split into {len(texts)} chunks of text (max. {chunk_size} tokens each)")
131 | return texts
132 |
133 | def does_vectorstore_exist(persist_directory: str, embeddings: HuggingFaceEmbeddings) -> bool:
134 | """
135 | Checks if vectorstore exists
136 | """
137 | db = Chroma(persist_directory=persist_directory, embedding_function=embeddings)
138 | if not db.get()['documents']:
139 | return False
140 | return True
141 |
142 | def main():
143 | # Create embeddings
144 | embeddings = HuggingFaceEmbeddings(model_name=embeddings_model_name)
145 | # Chroma client
146 | chroma_client = chromadb.PersistentClient(settings=CHROMA_SETTINGS , path=persist_directory)
147 |
148 | if does_vectorstore_exist(persist_directory, embeddings):
149 | # Update and store locally vectorstore
150 | print(f"Appending to existing vectorstore at {persist_directory}")
151 | db = Chroma(persist_directory=persist_directory, embedding_function=embeddings, client_settings=CHROMA_SETTINGS, client=chroma_client)
152 | collection = db.get()
153 | texts = process_documents([metadata['source'] for metadata in collection['metadatas']])
154 | print(f"Creating embeddings. May take some minutes...")
155 | db.add_documents(texts)
156 | else:
157 | # Create and store locally vectorstore
158 | print("Creating new vectorstore")
159 | texts = process_documents()
160 | print(f"Creating embeddings. May take some minutes...")
161 | db = Chroma.from_documents(texts, embeddings, persist_directory=persist_directory, client_settings=CHROMA_SETTINGS, client=chroma_client)
162 | db.persist()
163 | db = None
164 |
165 | print(f"Ingestion complete! You can now run privateGPT.py to query your documents")
166 |
167 |
168 | if __name__ == "__main__":
169 | main()
170 |
--------------------------------------------------------------------------------
/privateGPT.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | from dotenv import load_dotenv
3 | from langchain.chains import RetrievalQA
4 | from langchain.embeddings import HuggingFaceEmbeddings
5 | from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
6 | from langchain.vectorstores import Chroma
7 | from langchain.llms import GPT4All, LlamaCpp
8 | from langchain.chat_models import ChatOpenAI
9 |
10 | import chromadb
11 | import os
12 | import argparse
13 | import time
14 |
15 | if not load_dotenv():
16 | print("Could not load .env file or it is empty. Please check if it exists and is readable.")
17 | exit(1)
18 |
19 | embeddings_model_name = os.environ.get("EMBEDDINGS_MODEL_NAME")
20 | persist_directory = os.environ.get('PERSIST_DIRECTORY')
21 |
22 | model_type = os.environ.get('MODEL_TYPE')
23 | model_path = os.environ.get('MODEL_PATH')
24 | model_n_ctx = os.environ.get('MODEL_N_CTX')
25 |
26 | base_path = os.environ.get('OPENAI_API_BASE', 'http://localhost:8080/v1')
27 | key = os.environ.get('OPENAI_API_KEY', '-')
28 | model_name = os.environ.get('MODEL_NAME', 'gpt-3.5-turbo')
29 | model_n_batch = int(os.environ.get('MODEL_N_BATCH',8))
30 | target_source_chunks = int(os.environ.get('TARGET_SOURCE_CHUNKS',4))
31 |
32 | from constants import CHROMA_SETTINGS
33 |
34 | def main():
35 | # Parse the command line arguments
36 | args = parse_arguments()
37 | embeddings = HuggingFaceEmbeddings(model_name=embeddings_model_name)
38 | chroma_client = chromadb.PersistentClient(settings=CHROMA_SETTINGS , path=persist_directory)
39 | db = Chroma(persist_directory=persist_directory, embedding_function=embeddings, client_settings=CHROMA_SETTINGS, client=chroma_client)
40 | retriever = db.as_retriever(search_kwargs={"k": target_source_chunks})
41 | # activate/deactivate the streaming StdOut callback for LLMs
42 | callbacks = [] if args.mute_stream else [StreamingStdOutCallbackHandler()]
43 | # Prepare the LLM
44 | match model_type:
45 | case "LlamaCpp":
46 | llm = LlamaCpp(model_path=model_path, max_tokens=model_n_ctx, n_batch=model_n_batch, callbacks=callbacks, verbose=False)
47 | case "GPT4All":
48 | llm = GPT4All(model=model_path, max_tokens=model_n_ctx, backend='gptj', n_batch=model_n_batch, callbacks=callbacks, verbose=False)
49 | case "OpenAI":
50 | llm = ChatOpenAI(temperature=0, openai_api_base=base_path, openai_api_key=key, model_name=model_name)
51 | case _default:
52 | # raise exception if model_type is not supported
53 | raise Exception(f"Model type {model_type} is not supported. Please choose one of the following: LlamaCpp, GPT4All")
54 |
55 | qa = RetrievalQA.from_chain_type(llm=llm, chain_type="stuff", retriever=retriever, return_source_documents= not args.hide_source)
56 | # Interactive questions and answers
57 | while True:
58 | query = input("\nEnter a query: ")
59 | if query == "exit":
60 | break
61 | if query.strip() == "":
62 | continue
63 |
64 | # Get the answer from the chain
65 | start = time.time()
66 | res = qa(query)
67 | answer, docs = res['result'], [] if args.hide_source else res['source_documents']
68 | end = time.time()
69 |
70 | # Print the result
71 | print("\n\n> Question:")
72 | print(query)
73 | print(f"\n> Answer (took {round(end - start, 2)} s.):")
74 | print(answer)
75 |
76 | # Print the relevant sources used for the answer
77 | for document in docs:
78 | print("\n> " + document.metadata["source"] + ":")
79 | print(document.page_content)
80 |
81 | def parse_arguments():
82 | parser = argparse.ArgumentParser(description='privateGPT: Ask questions to your documents without an internet connection, '
83 | 'using the power of LLMs.')
84 | parser.add_argument("--hide-source", "-S", action='store_true',
85 | help='Use this flag to disable printing of source documents used for answers.')
86 |
87 | parser.add_argument("--mute-stream", "-M",
88 | action='store_true',
89 | help='Use this flag to disable the streaming StdOut callback for LLMs.')
90 |
91 | return parser.parse_args()
92 |
93 |
94 | if __name__ == "__main__":
95 | main()
96 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.poetry]
2 | name = "privategpt"
3 | version = "0.1.0"
4 | description = ""
5 | authors = ["Ivan Martinez "]
6 | license = "Apache Version 2.0"
7 | readme = "README.md"
8 |
9 | [tool.poetry.dependencies]
10 | python = "^3.10"
11 | langchain = "^0.0.228"
12 | gpt4all = "^1.0.3"
13 | chromadb = "^0.3.26"
14 | llama-cpp-python = "^0.1.68"
15 | urllib3 = "^2.0.3"
16 | PyMuPDF = "^1.22.5"
17 | python-dotenv = "^1.0.0"
18 | unstructured = "^0.8.0"
19 | extract-msg = "^0.41.5"
20 | tabulate = "^0.9.0"
21 | pandoc = "^2.3"
22 | pypandoc = "^1.11"
23 | tqdm = "^4.65.0"
24 |
25 |
26 | [build-system]
27 | requires = ["poetry-core"]
28 | build-backend = "poetry.core.masonry.api"
29 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | langchain==0.0.274
2 | gpt4all==1.0.8
3 | chromadb==0.4.7
4 | llama-cpp-python==0.1.81
5 | urllib3==2.0.4
6 | PyMuPDF==1.23.1
7 | openai==0.28.0
8 | python-dotenv==1.0.0
9 | unstructured==0.10.8
10 | extract-msg==0.45.0
11 | tabulate==0.9.0
12 | pandoc==2.3
13 | pypandoc==1.11
14 | tqdm==4.66.1
15 | sentence_transformers==2.2.2
16 |
--------------------------------------------------------------------------------
/source_documents/state_of_the_union.txt:
--------------------------------------------------------------------------------
1 | Madam Speaker, Madam Vice President, our First Lady and Second Gentleman. Members of Congress and the Cabinet. Justices of the Supreme Court. My fellow Americans.
2 |
3 | Last year COVID-19 kept us apart. This year we are finally together again.
4 |
5 | Tonight, we meet as Democrats Republicans and Independents. But most importantly as Americans.
6 |
7 | With a duty to one another to the American people to the Constitution.
8 |
9 | And with an unwavering resolve that freedom will always triumph over tyranny.
10 |
11 | Six days ago, Russia’s Vladimir Putin sought to shake the foundations of the free world thinking he could make it bend to his menacing ways. But he badly miscalculated.
12 |
13 | He thought he could roll into Ukraine and the world would roll over. Instead he met a wall of strength he never imagined.
14 |
15 | He met the Ukrainian people.
16 |
17 | From President Zelenskyy to every Ukrainian, their fearlessness, their courage, their determination, inspires the world.
18 |
19 | Groups of citizens blocking tanks with their bodies. Everyone from students to retirees teachers turned soldiers defending their homeland.
20 |
21 | In this struggle as President Zelenskyy said in his speech to the European Parliament “Light will win over darkness.” The Ukrainian Ambassador to the United States is here tonight.
22 |
23 | Let each of us here tonight in this Chamber send an unmistakable signal to Ukraine and to the world.
24 |
25 | Please rise if you are able and show that, Yes, we the United States of America stand with the Ukrainian people.
26 |
27 | Throughout our history we’ve learned this lesson when dictators do not pay a price for their aggression they cause more chaos.
28 |
29 | They keep moving.
30 |
31 | And the costs and the threats to America and the world keep rising.
32 |
33 | That’s why the NATO Alliance was created to secure peace and stability in Europe after World War 2.
34 |
35 | The United States is a member along with 29 other nations.
36 |
37 | It matters. American diplomacy matters. American resolve matters.
38 |
39 | Putin’s latest attack on Ukraine was premeditated and unprovoked.
40 |
41 | He rejected repeated efforts at diplomacy.
42 |
43 | He thought the West and NATO wouldn’t respond. And he thought he could divide us at home. Putin was wrong. We were ready. Here is what we did.
44 |
45 | We prepared extensively and carefully.
46 |
47 | We spent months building a coalition of other freedom-loving nations from Europe and the Americas to Asia and Africa to confront Putin.
48 |
49 | I spent countless hours unifying our European allies. We shared with the world in advance what we knew Putin was planning and precisely how he would try to falsely justify his aggression.
50 |
51 | We countered Russia’s lies with truth.
52 |
53 | And now that he has acted the free world is holding him accountable.
54 |
55 | Along with twenty-seven members of the European Union including France, Germany, Italy, as well as countries like the United Kingdom, Canada, Japan, Korea, Australia, New Zealand, and many others, even Switzerland.
56 |
57 | We are inflicting pain on Russia and supporting the people of Ukraine. Putin is now isolated from the world more than ever.
58 |
59 | Together with our allies –we are right now enforcing powerful economic sanctions.
60 |
61 | We are cutting off Russia’s largest banks from the international financial system.
62 |
63 | Preventing Russia’s central bank from defending the Russian Ruble making Putin’s $630 Billion “war fund” worthless.
64 |
65 | We are choking off Russia’s access to technology that will sap its economic strength and weaken its military for years to come.
66 |
67 | Tonight I say to the Russian oligarchs and corrupt leaders who have bilked billions of dollars off this violent regime no more.
68 |
69 | The U.S. Department of Justice is assembling a dedicated task force to go after the crimes of Russian oligarchs.
70 |
71 | We are joining with our European allies to find and seize your yachts your luxury apartments your private jets. We are coming for your ill-begotten gains.
72 |
73 | And tonight I am announcing that we will join our allies in closing off American air space to all Russian flights – further isolating Russia – and adding an additional squeeze –on their economy. The Ruble has lost 30% of its value.
74 |
75 | The Russian stock market has lost 40% of its value and trading remains suspended. Russia’s economy is reeling and Putin alone is to blame.
76 |
77 | Together with our allies we are providing support to the Ukrainians in their fight for freedom. Military assistance. Economic assistance. Humanitarian assistance.
78 |
79 | We are giving more than $1 Billion in direct assistance to Ukraine.
80 |
81 | And we will continue to aid the Ukrainian people as they defend their country and to help ease their suffering.
82 |
83 | Let me be clear, our forces are not engaged and will not engage in conflict with Russian forces in Ukraine.
84 |
85 | Our forces are not going to Europe to fight in Ukraine, but to defend our NATO Allies – in the event that Putin decides to keep moving west.
86 |
87 | For that purpose we’ve mobilized American ground forces, air squadrons, and ship deployments to protect NATO countries including Poland, Romania, Latvia, Lithuania, and Estonia.
88 |
89 | As I have made crystal clear the United States and our Allies will defend every inch of territory of NATO countries with the full force of our collective power.
90 |
91 | And we remain clear-eyed. The Ukrainians are fighting back with pure courage. But the next few days weeks, months, will be hard on them.
92 |
93 | Putin has unleashed violence and chaos. But while he may make gains on the battlefield – he will pay a continuing high price over the long run.
94 |
95 | And a proud Ukrainian people, who have known 30 years of independence, have repeatedly shown that they will not tolerate anyone who tries to take their country backwards.
96 |
97 | To all Americans, I will be honest with you, as I’ve always promised. A Russian dictator, invading a foreign country, has costs around the world.
98 |
99 | And I’m taking robust action to make sure the pain of our sanctions is targeted at Russia’s economy. And I will use every tool at our disposal to protect American businesses and consumers.
100 |
101 | Tonight, I can announce that the United States has worked with 30 other countries to release 60 Million barrels of oil from reserves around the world.
102 |
103 | America will lead that effort, releasing 30 Million barrels from our own Strategic Petroleum Reserve. And we stand ready to do more if necessary, unified with our allies.
104 |
105 | These steps will help blunt gas prices here at home. And I know the news about what’s happening can seem alarming.
106 |
107 | But I want you to know that we are going to be okay.
108 |
109 | When the history of this era is written Putin’s war on Ukraine will have left Russia weaker and the rest of the world stronger.
110 |
111 | While it shouldn’t have taken something so terrible for people around the world to see what’s at stake now everyone sees it clearly.
112 |
113 | We see the unity among leaders of nations and a more unified Europe a more unified West. And we see unity among the people who are gathering in cities in large crowds around the world even in Russia to demonstrate their support for Ukraine.
114 |
115 | In the battle between democracy and autocracy, democracies are rising to the moment, and the world is clearly choosing the side of peace and security.
116 |
117 | This is a real test. It’s going to take time. So let us continue to draw inspiration from the iron will of the Ukrainian people.
118 |
119 | To our fellow Ukrainian Americans who forge a deep bond that connects our two nations we stand with you.
120 |
121 | Putin may circle Kyiv with tanks, but he will never gain the hearts and souls of the Ukrainian people.
122 |
123 | He will never extinguish their love of freedom. He will never weaken the resolve of the free world.
124 |
125 | We meet tonight in an America that has lived through two of the hardest years this nation has ever faced.
126 |
127 | The pandemic has been punishing.
128 |
129 | And so many families are living paycheck to paycheck, struggling to keep up with the rising cost of food, gas, housing, and so much more.
130 |
131 | I understand.
132 |
133 | I remember when my Dad had to leave our home in Scranton, Pennsylvania to find work. I grew up in a family where if the price of food went up, you felt it.
134 |
135 | That’s why one of the first things I did as President was fight to pass the American Rescue Plan.
136 |
137 | Because people were hurting. We needed to act, and we did.
138 |
139 | Few pieces of legislation have done more in a critical moment in our history to lift us out of crisis.
140 |
141 | It fueled our efforts to vaccinate the nation and combat COVID-19. It delivered immediate economic relief for tens of millions of Americans.
142 |
143 | Helped put food on their table, keep a roof over their heads, and cut the cost of health insurance.
144 |
145 | And as my Dad used to say, it gave people a little breathing room.
146 |
147 | And unlike the $2 Trillion tax cut passed in the previous administration that benefitted the top 1% of Americans, the American Rescue Plan helped working people—and left no one behind.
148 |
149 | And it worked. It created jobs. Lots of jobs.
150 |
151 | In fact—our economy created over 6.5 Million new jobs just last year, more jobs created in one year
152 | than ever before in the history of America.
153 |
154 | Our economy grew at a rate of 5.7% last year, the strongest growth in nearly 40 years, the first step in bringing fundamental change to an economy that hasn’t worked for the working people of this nation for too long.
155 |
156 | For the past 40 years we were told that if we gave tax breaks to those at the very top, the benefits would trickle down to everyone else.
157 |
158 | But that trickle-down theory led to weaker economic growth, lower wages, bigger deficits, and the widest gap between those at the top and everyone else in nearly a century.
159 |
160 | Vice President Harris and I ran for office with a new economic vision for America.
161 |
162 | Invest in America. Educate Americans. Grow the workforce. Build the economy from the bottom up
163 | and the middle out, not from the top down.
164 |
165 | Because we know that when the middle class grows, the poor have a ladder up and the wealthy do very well.
166 |
167 | America used to have the best roads, bridges, and airports on Earth.
168 |
169 | Now our infrastructure is ranked 13th in the world.
170 |
171 | We won’t be able to compete for the jobs of the 21st Century if we don’t fix that.
172 |
173 | That’s why it was so important to pass the Bipartisan Infrastructure Law—the most sweeping investment to rebuild America in history.
174 |
175 | This was a bipartisan effort, and I want to thank the members of both parties who worked to make it happen.
176 |
177 | We’re done talking about infrastructure weeks.
178 |
179 | We’re going to have an infrastructure decade.
180 |
181 | It is going to transform America and put us on a path to win the economic competition of the 21st Century that we face with the rest of the world—particularly with China.
182 |
183 | As I’ve told Xi Jinping, it is never a good bet to bet against the American people.
184 |
185 | We’ll create good jobs for millions of Americans, modernizing roads, airports, ports, and waterways all across America.
186 |
187 | And we’ll do it all to withstand the devastating effects of the climate crisis and promote environmental justice.
188 |
189 | We’ll build a national network of 500,000 electric vehicle charging stations, begin to replace poisonous lead pipes—so every child—and every American—has clean water to drink at home and at school, provide affordable high-speed internet for every American—urban, suburban, rural, and tribal communities.
190 |
191 | 4,000 projects have already been announced.
192 |
193 | And tonight, I’m announcing that this year we will start fixing over 65,000 miles of highway and 1,500 bridges in disrepair.
194 |
195 | When we use taxpayer dollars to rebuild America – we are going to Buy American: buy American products to support American jobs.
196 |
197 | The federal government spends about $600 Billion a year to keep the country safe and secure.
198 |
199 | There’s been a law on the books for almost a century
200 | to make sure taxpayers’ dollars support American jobs and businesses.
201 |
202 | Every Administration says they’ll do it, but we are actually doing it.
203 |
204 | We will buy American to make sure everything from the deck of an aircraft carrier to the steel on highway guardrails are made in America.
205 |
206 | But to compete for the best jobs of the future, we also need to level the playing field with China and other competitors.
207 |
208 | That’s why it is so important to pass the Bipartisan Innovation Act sitting in Congress that will make record investments in emerging technologies and American manufacturing.
209 |
210 | Let me give you one example of why it’s so important to pass it.
211 |
212 | If you travel 20 miles east of Columbus, Ohio, you’ll find 1,000 empty acres of land.
213 |
214 | It won’t look like much, but if you stop and look closely, you’ll see a “Field of dreams,” the ground on which America’s future will be built.
215 |
216 | This is where Intel, the American company that helped build Silicon Valley, is going to build its $20 billion semiconductor “mega site”.
217 |
218 | Up to eight state-of-the-art factories in one place. 10,000 new good-paying jobs.
219 |
220 | Some of the most sophisticated manufacturing in the world to make computer chips the size of a fingertip that power the world and our everyday lives.
221 |
222 | Smartphones. The Internet. Technology we have yet to invent.
223 |
224 | But that’s just the beginning.
225 |
226 | Intel’s CEO, Pat Gelsinger, who is here tonight, told me they are ready to increase their investment from
227 | $20 billion to $100 billion.
228 |
229 | That would be one of the biggest investments in manufacturing in American history.
230 |
231 | And all they’re waiting for is for you to pass this bill.
232 |
233 | So let’s not wait any longer. Send it to my desk. I’ll sign it.
234 |
235 | And we will really take off.
236 |
237 | And Intel is not alone.
238 |
239 | There’s something happening in America.
240 |
241 | Just look around and you’ll see an amazing story.
242 |
243 | The rebirth of the pride that comes from stamping products “Made In America.” The revitalization of American manufacturing.
244 |
245 | Companies are choosing to build new factories here, when just a few years ago, they would have built them overseas.
246 |
247 | That’s what is happening. Ford is investing $11 billion to build electric vehicles, creating 11,000 jobs across the country.
248 |
249 | GM is making the largest investment in its history—$7 billion to build electric vehicles, creating 4,000 jobs in Michigan.
250 |
251 | All told, we created 369,000 new manufacturing jobs in America just last year.
252 |
253 | Powered by people I’ve met like JoJo Burgess, from generations of union steelworkers from Pittsburgh, who’s here with us tonight.
254 |
255 | As Ohio Senator Sherrod Brown says, “It’s time to bury the label “Rust Belt.”
256 |
257 | It’s time.
258 |
259 | But with all the bright spots in our economy, record job growth and higher wages, too many families are struggling to keep up with the bills.
260 |
261 | Inflation is robbing them of the gains they might otherwise feel.
262 |
263 | I get it. That’s why my top priority is getting prices under control.
264 |
265 | Look, our economy roared back faster than most predicted, but the pandemic meant that businesses had a hard time hiring enough workers to keep up production in their factories.
266 |
267 | The pandemic also disrupted global supply chains.
268 |
269 | When factories close, it takes longer to make goods and get them from the warehouse to the store, and prices go up.
270 |
271 | Look at cars.
272 |
273 | Last year, there weren’t enough semiconductors to make all the cars that people wanted to buy.
274 |
275 | And guess what, prices of automobiles went up.
276 |
277 | So—we have a choice.
278 |
279 | One way to fight inflation is to drive down wages and make Americans poorer.
280 |
281 | I have a better plan to fight inflation.
282 |
283 | Lower your costs, not your wages.
284 |
285 | Make more cars and semiconductors in America.
286 |
287 | More infrastructure and innovation in America.
288 |
289 | More goods moving faster and cheaper in America.
290 |
291 | More jobs where you can earn a good living in America.
292 |
293 | And instead of relying on foreign supply chains, let’s make it in America.
294 |
295 | Economists call it “increasing the productive capacity of our economy.”
296 |
297 | I call it building a better America.
298 |
299 | My plan to fight inflation will lower your costs and lower the deficit.
300 |
301 | 17 Nobel laureates in economics say my plan will ease long-term inflationary pressures. Top business leaders and most Americans support my plan. And here’s the plan:
302 |
303 | First – cut the cost of prescription drugs. Just look at insulin. One in ten Americans has diabetes. In Virginia, I met a 13-year-old boy named Joshua Davis.
304 |
305 | He and his Dad both have Type 1 diabetes, which means they need insulin every day. Insulin costs about $10 a vial to make.
306 |
307 | But drug companies charge families like Joshua and his Dad up to 30 times more. I spoke with Joshua’s mom.
308 |
309 | Imagine what it’s like to look at your child who needs insulin and have no idea how you’re going to pay for it.
310 |
311 | What it does to your dignity, your ability to look your child in the eye, to be the parent you expect to be.
312 |
313 | Joshua is here with us tonight. Yesterday was his birthday. Happy birthday, buddy.
314 |
315 | For Joshua, and for the 200,000 other young people with Type 1 diabetes, let’s cap the cost of insulin at $35 a month so everyone can afford it.
316 |
317 | Drug companies will still do very well. And while we’re at it let Medicare negotiate lower prices for prescription drugs, like the VA already does.
318 |
319 | Look, the American Rescue Plan is helping millions of families on Affordable Care Act plans save $2,400 a year on their health care premiums. Let’s close the coverage gap and make those savings permanent.
320 |
321 | Second – cut energy costs for families an average of $500 a year by combatting climate change.
322 |
323 | Let’s provide investments and tax credits to weatherize your homes and businesses to be energy efficient and you get a tax credit; double America’s clean energy production in solar, wind, and so much more; lower the price of electric vehicles, saving you another $80 a month because you’ll never have to pay at the gas pump again.
324 |
325 | Third – cut the cost of child care. Many families pay up to $14,000 a year for child care per child.
326 |
327 | Middle-class and working families shouldn’t have to pay more than 7% of their income for care of young children.
328 |
329 | My plan will cut the cost in half for most families and help parents, including millions of women, who left the workforce during the pandemic because they couldn’t afford child care, to be able to get back to work.
330 |
331 | My plan doesn’t stop there. It also includes home and long-term care. More affordable housing. And Pre-K for every 3- and 4-year-old.
332 |
333 | All of these will lower costs.
334 |
335 | And under my plan, nobody earning less than $400,000 a year will pay an additional penny in new taxes. Nobody.
336 |
337 | The one thing all Americans agree on is that the tax system is not fair. We have to fix it.
338 |
339 | I’m not looking to punish anyone. But let’s make sure corporations and the wealthiest Americans start paying their fair share.
340 |
341 | Just last year, 55 Fortune 500 corporations earned $40 billion in profits and paid zero dollars in federal income tax.
342 |
343 | That’s simply not fair. That’s why I’ve proposed a 15% minimum tax rate for corporations.
344 |
345 | We got more than 130 countries to agree on a global minimum tax rate so companies can’t get out of paying their taxes at home by shipping jobs and factories overseas.
346 |
347 | That’s why I’ve proposed closing loopholes so the very wealthy don’t pay a lower tax rate than a teacher or a firefighter.
348 |
349 | So that’s my plan. It will grow the economy and lower costs for families.
350 |
351 | So what are we waiting for? Let’s get this done. And while you’re at it, confirm my nominees to the Federal Reserve, which plays a critical role in fighting inflation.
352 |
353 | My plan will not only lower costs to give families a fair shot, it will lower the deficit.
354 |
355 | The previous Administration not only ballooned the deficit with tax cuts for the very wealthy and corporations, it undermined the watchdogs whose job was to keep pandemic relief funds from being wasted.
356 |
357 | But in my administration, the watchdogs have been welcomed back.
358 |
359 | We’re going after the criminals who stole billions in relief money meant for small businesses and millions of Americans.
360 |
361 | And tonight, I’m announcing that the Justice Department will name a chief prosecutor for pandemic fraud.
362 |
363 | By the end of this year, the deficit will be down to less than half what it was before I took office.
364 |
365 | The only president ever to cut the deficit by more than one trillion dollars in a single year.
366 |
367 | Lowering your costs also means demanding more competition.
368 |
369 | I’m a capitalist, but capitalism without competition isn’t capitalism.
370 |
371 | It’s exploitation—and it drives up prices.
372 |
373 | When corporations don’t have to compete, their profits go up, your prices go up, and small businesses and family farmers and ranchers go under.
374 |
375 | We see it happening with ocean carriers moving goods in and out of America.
376 |
377 | During the pandemic, these foreign-owned companies raised prices by as much as 1,000% and made record profits.
378 |
379 | Tonight, I’m announcing a crackdown on these companies overcharging American businesses and consumers.
380 |
381 | And as Wall Street firms take over more nursing homes, quality in those homes has gone down and costs have gone up.
382 |
383 | That ends on my watch.
384 |
385 | Medicare is going to set higher standards for nursing homes and make sure your loved ones get the care they deserve and expect.
386 |
387 | We’ll also cut costs and keep the economy going strong by giving workers a fair shot, provide more training and apprenticeships, hire them based on their skills not degrees.
388 |
389 | Let’s pass the Paycheck Fairness Act and paid leave.
390 |
391 | Raise the minimum wage to $15 an hour and extend the Child Tax Credit, so no one has to raise a family in poverty.
392 |
393 | Let’s increase Pell Grants and increase our historic support of HBCUs, and invest in what Jill—our First Lady who teaches full-time—calls America’s best-kept secret: community colleges.
394 |
395 | And let’s pass the PRO Act when a majority of workers want to form a union—they shouldn’t be stopped.
396 |
397 | When we invest in our workers, when we build the economy from the bottom up and the middle out together, we can do something we haven’t done in a long time: build a better America.
398 |
399 | For more than two years, COVID-19 has impacted every decision in our lives and the life of the nation.
400 |
401 | And I know you’re tired, frustrated, and exhausted.
402 |
403 | But I also know this.
404 |
405 | Because of the progress we’ve made, because of your resilience and the tools we have, tonight I can say
406 | we are moving forward safely, back to more normal routines.
407 |
408 | We’ve reached a new moment in the fight against COVID-19, with severe cases down to a level not seen since last July.
409 |
410 | Just a few days ago, the Centers for Disease Control and Prevention—the CDC—issued new mask guidelines.
411 |
412 | Under these new guidelines, most Americans in most of the country can now be mask free.
413 |
414 | And based on the projections, more of the country will reach that point across the next couple of weeks.
415 |
416 | Thanks to the progress we have made this past year, COVID-19 need no longer control our lives.
417 |
418 | I know some are talking about “living with COVID-19”. Tonight – I say that we will never just accept living with COVID-19.
419 |
420 | We will continue to combat the virus as we do other diseases. And because this is a virus that mutates and spreads, we will stay on guard.
421 |
422 | Here are four common sense steps as we move forward safely.
423 |
424 | First, stay protected with vaccines and treatments. We know how incredibly effective vaccines are. If you’re vaccinated and boosted you have the highest degree of protection.
425 |
426 | We will never give up on vaccinating more Americans. Now, I know parents with kids under 5 are eager to see a vaccine authorized for their children.
427 |
428 | The scientists are working hard to get that done and we’ll be ready with plenty of vaccines when they do.
429 |
430 | We’re also ready with anti-viral treatments. If you get COVID-19, the Pfizer pill reduces your chances of ending up in the hospital by 90%.
431 |
432 | We’ve ordered more of these pills than anyone in the world. And Pfizer is working overtime to get us 1 Million pills this month and more than double that next month.
433 |
434 | And we’re launching the “Test to Treat” initiative so people can get tested at a pharmacy, and if they’re positive, receive antiviral pills on the spot at no cost.
435 |
436 | If you’re immunocompromised or have some other vulnerability, we have treatments and free high-quality masks.
437 |
438 | We’re leaving no one behind or ignoring anyone’s needs as we move forward.
439 |
440 | And on testing, we have made hundreds of millions of tests available for you to order for free.
441 |
442 | Even if you already ordered free tests tonight, I am announcing that you can order more from covidtests.gov starting next week.
443 |
444 | Second – we must prepare for new variants. Over the past year, we’ve gotten much better at detecting new variants.
445 |
446 | If necessary, we’ll be able to deploy new vaccines within 100 days instead of many more months or years.
447 |
448 | And, if Congress provides the funds we need, we’ll have new stockpiles of tests, masks, and pills ready if needed.
449 |
450 | I cannot promise a new variant won’t come. But I can promise you we’ll do everything within our power to be ready if it does.
451 |
452 | Third – we can end the shutdown of schools and businesses. We have the tools we need.
453 |
454 | It’s time for Americans to get back to work and fill our great downtowns again. People working from home can feel safe to begin to return to the office.
455 |
456 | We’re doing that here in the federal government. The vast majority of federal workers will once again work in person.
457 |
458 | Our schools are open. Let’s keep it that way. Our kids need to be in school.
459 |
460 | And with 75% of adult Americans fully vaccinated and hospitalizations down by 77%, most Americans can remove their masks, return to work, stay in the classroom, and move forward safely.
461 |
462 | We achieved this because we provided free vaccines, treatments, tests, and masks.
463 |
464 | Of course, continuing this costs money.
465 |
466 | I will soon send Congress a request.
467 |
468 | The vast majority of Americans have used these tools and may want to again, so I expect Congress to pass it quickly.
469 |
470 | Fourth, we will continue vaccinating the world.
471 |
472 | We’ve sent 475 Million vaccine doses to 112 countries, more than any other nation.
473 |
474 | And we won’t stop.
475 |
476 | We have lost so much to COVID-19. Time with one another. And worst of all, so much loss of life.
477 |
478 | Let’s use this moment to reset. Let’s stop looking at COVID-19 as a partisan dividing line and see it for what it is: A God-awful disease.
479 |
480 | Let’s stop seeing each other as enemies, and start seeing each other for who we really are: Fellow Americans.
481 |
482 | We can’t change how divided we’ve been. But we can change how we move forward—on COVID-19 and other issues we must face together.
483 |
484 | I recently visited the New York City Police Department days after the funerals of Officer Wilbert Mora and his partner, Officer Jason Rivera.
485 |
486 | They were responding to a 9-1-1 call when a man shot and killed them with a stolen gun.
487 |
488 | Officer Mora was 27 years old.
489 |
490 | Officer Rivera was 22.
491 |
492 | Both Dominican Americans who’d grown up on the same streets they later chose to patrol as police officers.
493 |
494 | I spoke with their families and told them that we are forever in debt for their sacrifice, and we will carry on their mission to restore the trust and safety every community deserves.
495 |
496 | I’ve worked on these issues a long time.
497 |
498 | I know what works: Investing in crime preventionand community police officers who’ll walk the beat, who’ll know the neighborhood, and who can restore trust and safety.
499 |
500 | So let’s not abandon our streets. Or choose between safety and equal justice.
501 |
502 | Let’s come together to protect our communities, restore trust, and hold law enforcement accountable.
503 |
504 | That’s why the Justice Department required body cameras, banned chokeholds, and restricted no-knock warrants for its officers.
505 |
506 | That’s why the American Rescue Plan provided $350 Billion that cities, states, and counties can use to hire more police and invest in proven strategies like community violence interruption—trusted messengers breaking the cycle of violence and trauma and giving young people hope.
507 |
508 | We should all agree: The answer is not to Defund the police. The answer is to FUND the police with the resources and training they need to protect our communities.
509 |
510 | I ask Democrats and Republicans alike: Pass my budget and keep our neighborhoods safe.
511 |
512 | And I will keep doing everything in my power to crack down on gun trafficking and ghost guns you can buy online and make at home—they have no serial numbers and can’t be traced.
513 |
514 | And I ask Congress to pass proven measures to reduce gun violence. Pass universal background checks. Why should anyone on a terrorist list be able to purchase a weapon?
515 |
516 | Ban assault weapons and high-capacity magazines.
517 |
518 | Repeal the liability shield that makes gun manufacturers the only industry in America that can’t be sued.
519 |
520 | These laws don’t infringe on the Second Amendment. They save lives.
521 |
522 | The most fundamental right in America is the right to vote – and to have it counted. And it’s under assault.
523 |
524 | In state after state, new laws have been passed, not only to suppress the vote, but to subvert entire elections.
525 |
526 | We cannot let this happen.
527 |
528 | Tonight. I call on the Senate to: Pass the Freedom to Vote Act. Pass the John Lewis Voting Rights Act. And while you’re at it, pass the Disclose Act so Americans can know who is funding our elections.
529 |
530 | Tonight, I’d like to honor someone who has dedicated his life to serve this country: Justice Stephen Breyer—an Army veteran, Constitutional scholar, and retiring Justice of the United States Supreme Court. Justice Breyer, thank you for your service.
531 |
532 | One of the most serious constitutional responsibilities a President has is nominating someone to serve on the United States Supreme Court.
533 |
534 | And I did that 4 days ago, when I nominated Circuit Court of Appeals Judge Ketanji Brown Jackson. One of our nation’s top legal minds, who will continue Justice Breyer’s legacy of excellence.
535 |
536 | A former top litigator in private practice. A former federal public defender. And from a family of public school educators and police officers. A consensus builder. Since she’s been nominated, she’s received a broad range of support—from the Fraternal Order of Police to former judges appointed by Democrats and Republicans.
537 |
538 | And if we are to advance liberty and justice, we need to secure the Border and fix the immigration system.
539 |
540 | We can do both. At our border, we’ve installed new technology like cutting-edge scanners to better detect drug smuggling.
541 |
542 | We’ve set up joint patrols with Mexico and Guatemala to catch more human traffickers.
543 |
544 | We’re putting in place dedicated immigration judges so families fleeing persecution and violence can have their cases heard faster.
545 |
546 | We’re securing commitments and supporting partners in South and Central America to host more refugees and secure their own borders.
547 |
548 | We can do all this while keeping lit the torch of liberty that has led generations of immigrants to this land—my forefathers and so many of yours.
549 |
550 | Provide a pathway to citizenship for Dreamers, those on temporary status, farm workers, and essential workers.
551 |
552 | Revise our laws so businesses have the workers they need and families don’t wait decades to reunite.
553 |
554 | It’s not only the right thing to do—it’s the economically smart thing to do.
555 |
556 | That’s why immigration reform is supported by everyone from labor unions to religious leaders to the U.S. Chamber of Commerce.
557 |
558 | Let’s get it done once and for all.
559 |
560 | Advancing liberty and justice also requires protecting the rights of women.
561 |
562 | The constitutional right affirmed in Roe v. Wade—standing precedent for half a century—is under attack as never before.
563 |
564 | If we want to go forward—not backward—we must protect access to health care. Preserve a woman’s right to choose. And let’s continue to advance maternal health care in America.
565 |
566 | And for our LGBTQ+ Americans, let’s finally get the bipartisan Equality Act to my desk. The onslaught of state laws targeting transgender Americans and their families is wrong.
567 |
568 | As I said last year, especially to our younger transgender Americans, I will always have your back as your President, so you can be yourself and reach your God-given potential.
569 |
570 | While it often appears that we never agree, that isn’t true. I signed 80 bipartisan bills into law last year. From preventing government shutdowns to protecting Asian-Americans from still-too-common hate crimes to reforming military justice.
571 |
572 | And soon, we’ll strengthen the Violence Against Women Act that I first wrote three decades ago. It is important for us to show the nation that we can come together and do big things.
573 |
574 | So tonight I’m offering a Unity Agenda for the Nation. Four big things we can do together.
575 |
576 | First, beat the opioid epidemic.
577 |
578 | There is so much we can do. Increase funding for prevention, treatment, harm reduction, and recovery.
579 |
580 | Get rid of outdated rules that stop doctors from prescribing treatments. And stop the flow of illicit drugs by working with state and local law enforcement to go after traffickers.
581 |
582 | If you’re suffering from addiction, know you are not alone. I believe in recovery, and I celebrate the 23 million Americans in recovery.
583 |
584 | Second, let’s take on mental health. Especially among our children, whose lives and education have been turned upside down.
585 |
586 | The American Rescue Plan gave schools money to hire teachers and help students make up for lost learning.
587 |
588 | I urge every parent to make sure your school does just that. And we can all play a part—sign up to be a tutor or a mentor.
589 |
590 | Children were also struggling before the pandemic. Bullying, violence, trauma, and the harms of social media.
591 |
592 | As Frances Haugen, who is here with us tonight, has shown, we must hold social media platforms accountable for the national experiment they’re conducting on our children for profit.
593 |
594 | It’s time to strengthen privacy protections, ban targeted advertising to children, demand tech companies stop collecting personal data on our children.
595 |
596 | And let’s get all Americans the mental health services they need. More people they can turn to for help, and full parity between physical and mental health care.
597 |
598 | Third, support our veterans.
599 |
600 | Veterans are the best of us.
601 |
602 | I’ve always believed that we have a sacred obligation to equip all those we send to war and care for them and their families when they come home.
603 |
604 | My administration is providing assistance with job training and housing, and now helping lower-income veterans get VA care debt-free.
605 |
606 | Our troops in Iraq and Afghanistan faced many dangers.
607 |
608 | One was stationed at bases and breathing in toxic smoke from “burn pits” that incinerated wastes of war—medical and hazard material, jet fuel, and more.
609 |
610 | When they came home, many of the world’s fittest and best trained warriors were never the same.
611 |
612 | Headaches. Numbness. Dizziness.
613 |
614 | A cancer that would put them in a flag-draped coffin.
615 |
616 | I know.
617 |
618 | One of those soldiers was my son Major Beau Biden.
619 |
620 | We don’t know for sure if a burn pit was the cause of his brain cancer, or the diseases of so many of our troops.
621 |
622 | But I’m committed to finding out everything we can.
623 |
624 | Committed to military families like Danielle Robinson from Ohio.
625 |
626 | The widow of Sergeant First Class Heath Robinson.
627 |
628 | He was born a soldier. Army National Guard. Combat medic in Kosovo and Iraq.
629 |
630 | Stationed near Baghdad, just yards from burn pits the size of football fields.
631 |
632 | Heath’s widow Danielle is here with us tonight. They loved going to Ohio State football games. He loved building Legos with their daughter.
633 |
634 | But cancer from prolonged exposure to burn pits ravaged Heath’s lungs and body.
635 |
636 | Danielle says Heath was a fighter to the very end.
637 |
638 | He didn’t know how to stop fighting, and neither did she.
639 |
640 | Through her pain she found purpose to demand we do better.
641 |
642 | Tonight, Danielle—we are.
643 |
644 | The VA is pioneering new ways of linking toxic exposures to diseases, already helping more veterans get benefits.
645 |
646 | And tonight, I’m announcing we’re expanding eligibility to veterans suffering from nine respiratory cancers.
647 |
648 | I’m also calling on Congress: pass a law to make sure veterans devastated by toxic exposures in Iraq and Afghanistan finally get the benefits and comprehensive health care they deserve.
649 |
650 | And fourth, let’s end cancer as we know it.
651 |
652 | This is personal to me and Jill, to Kamala, and to so many of you.
653 |
654 | Cancer is the #2 cause of death in America–second only to heart disease.
655 |
656 | Last month, I announced our plan to supercharge
657 | the Cancer Moonshot that President Obama asked me to lead six years ago.
658 |
659 | Our goal is to cut the cancer death rate by at least 50% over the next 25 years, turn more cancers from death sentences into treatable diseases.
660 |
661 | More support for patients and families.
662 |
663 | To get there, I call on Congress to fund ARPA-H, the Advanced Research Projects Agency for Health.
664 |
665 | It’s based on DARPA—the Defense Department project that led to the Internet, GPS, and so much more.
666 |
667 | ARPA-H will have a singular purpose—to drive breakthroughs in cancer, Alzheimer’s, diabetes, and more.
668 |
669 | A unity agenda for the nation.
670 |
671 | We can do this.
672 |
673 | My fellow Americans—tonight , we have gathered in a sacred space—the citadel of our democracy.
674 |
675 | In this Capitol, generation after generation, Americans have debated great questions amid great strife, and have done great things.
676 |
677 | We have fought for freedom, expanded liberty, defeated totalitarianism and terror.
678 |
679 | And built the strongest, freest, and most prosperous nation the world has ever known.
680 |
681 | Now is the hour.
682 |
683 | Our moment of responsibility.
684 |
685 | Our test of resolve and conscience, of history itself.
686 |
687 | It is in this moment that our character is formed. Our purpose is found. Our future is forged.
688 |
689 | Well I know this nation.
690 |
691 | We will meet the test.
692 |
693 | To protect freedom and liberty, to expand fairness and opportunity.
694 |
695 | We will save democracy.
696 |
697 | As hard as these times have been, I am more optimistic about America today than I have been my whole life.
698 |
699 | Because I see the future that is within our grasp.
700 |
701 | Because I know there is simply nothing beyond our capacity.
702 |
703 | We are the only nation on Earth that has always turned every crisis we have faced into an opportunity.
704 |
705 | The only nation that can be defined by a single word: possibilities.
706 |
707 | So on this night, in our 245th year as a nation, I have come to report on the State of the Union.
708 |
709 | And my report is this: the State of the Union is strong—because you, the American people, are strong.
710 |
711 | We are stronger today than we were a year ago.
712 |
713 | And we will be stronger a year from now than we are today.
714 |
715 | Now is our moment to meet and overcome the challenges of our time.
716 |
717 | And we will, as one people.
718 |
719 | One America.
720 |
721 | The United States of America.
722 |
723 | May God bless you all. May God protect our troops.
--------------------------------------------------------------------------------