Showing preview only (802K chars total). Download the full file or copy to clipboard to get everything.
Repository: vemonet/libre-chat
Branch: main
Commit: dbb8e3400e52
Files: 79
Total size: 769.2 KB
Directory structure:
gitextract_1289dhnl/
├── .dockerignore
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug.yml
│ │ └── feature_request.yml
│ └── workflows/
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CITATION.cff
├── Dockerfile
├── LICENSE.txt
├── README.md
├── chat.yml
├── config/
│ ├── chat-conversation.yml
│ └── chat-vectorstore-qa.yml
├── docker-compose.yml
├── docs/
│ ├── docs/
│ │ ├── ChatConf.md
│ │ ├── ChatEndpoint.md
│ │ ├── ChatRouter.md
│ │ ├── Llm.md
│ │ ├── assets/
│ │ │ └── custom.css
│ │ ├── configure-conversation.md
│ │ ├── configure-documents-qa.md
│ │ ├── development.md
│ │ ├── index.md
│ │ ├── use-docker.md
│ │ └── use-pip.md
│ ├── includes/
│ │ └── abbreviations.md
│ └── mkdocs.yml
├── documents/
│ └── gdp.csv
├── frontend/
│ ├── .gitignore
│ ├── README.md
│ ├── astro.config.mjs
│ ├── package.json
│ ├── src/
│ │ ├── components/
│ │ │ ├── admin.tsx
│ │ │ ├── chat.tsx
│ │ │ └── nanostores.ts
│ │ ├── env.d.ts
│ │ ├── layouts/
│ │ │ ├── Layout.astro
│ │ │ └── Nav.tsx
│ │ └── pages/
│ │ ├── admin.astro
│ │ └── index.astro
│ ├── tailwind.config.mjs
│ └── tsconfig.json
├── pyproject.toml
├── scripts/
│ ├── deploy.sh
│ ├── download.sh
│ ├── init.py
│ ├── langchain.ipynb
│ ├── main.py
│ ├── qdrant_config.yml
│ ├── requirements.txt
│ └── start.sh
├── src/
│ └── libre_chat/
│ ├── __init__.py
│ ├── __main__.py
│ ├── conf.py
│ ├── endpoint.py
│ ├── llm.py
│ ├── py.typed
│ ├── router.py
│ ├── static/
│ │ └── web-worker.js
│ ├── ui.py
│ ├── utils.py
│ ├── vectorstore.py
│ └── webapp/
│ ├── _astro/
│ │ ├── Nav.FPLT-AC_.js
│ │ ├── admin.e50kLjN3.css
│ │ ├── admin.uwsUQjhr.js
│ │ ├── chat.mnOtRnw4.js
│ │ ├── client.XqyIkt4q.js
│ │ ├── nanostores.RVhpkXze.js
│ │ └── web.zg9RI5L8.js
│ ├── admin/
│ │ └── index.html
│ └── index.html
└── tests/
├── __init__.py
├── config/
│ └── additional-prop.yml
├── test_api.py
├── test_api_qa.py
├── test_cli.py
├── test_llm.py
└── test_utils.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .dockerignore
================================================
models/
vectorstore/
embeddings/
data/
gradio_cached_examples/
sentence-transformers/
try-*/
tests/tmp/
docker-compose.prod.yml
/main.py
documents/*.txt
documents/*.eml
docs/dist/
# Python artefacts
build/
*.egg-info
.eggs/
dist/
__pycache__/
.pytest_cache/
.ruff_cache/
.mypy_cache/
.coverage*
coverage.xml
coverage/
# Virtual envs
.venv/
venv/
# Notebooks
.ipynb_checkpoints
.virtual_documents/
.cache/
.config/
.ipython/
.jupyter/
.local/
.npm/
.bash_history
__pycache__/
# MacOS
.DS_Store
# IDEs
.idea/
.vscode/
================================================
FILE: .github/ISSUE_TEMPLATE/bug.yml
================================================
name: 🐞 Bug Report
description: Report a bug
labels: ['bug']
body:
- type: markdown
attributes:
value: |
Please search for [existing issues](https://github.com/vemonet/libre-chat/issues?q=is%3Aissue) about this problem first.
- type: textarea
id: description
attributes:
label: Describe the bug
description: What are you trying to get done, what has happened, what went wrong, and what did you expect?
placeholder: Bug description
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction
description: A link to a reproduction repo or steps to reproduce the behaviour.
placeholder: |
Paste a log of command(s) you ran, output, tracebacks, etc, here
- type: input
id: os
attributes:
label: Operating System
validations:
required: true
- type: input
id: version
attributes:
label: Libre Chat version
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: 💡 Feature request
description: Suggest an idea.
labels: ['enhancement']
body:
- type: textarea
id: description
attributes:
label: Describe the feature
description: What do you want to improve? Why?
placeholder: Feature description
validations:
required: true
- type: textarea
id: implementation
attributes:
label: An idea of implementation
description: Describe how you would implement it, if you have some ideas
placeholder: |
Your ideas, link to relevant packages...
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or comment here.
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
workflow_dispatch:
release:
types: [published]
jobs:
tests:
uses: vemonet/libre-chat/.github/workflows/test.yml@main
secrets: inherit
permissions:
security-events: write
actions: read
contents: read
packages: write
id-token: write
pages: write
statuses: write
publish:
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
================================================
FILE: .github/workflows/test.yml
================================================
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
workflow_call:
workflow_dispatch:
jobs:
tests:
name: ✅ Run tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.8"
os: ubuntu-latest
- python-version: "3.9"
os: ubuntu-latest
- python-version: "3.10"
os: ubuntu-latest
- python-version: "3.11"
os: ubuntu-latest
# - python-version: "3.11"
# os: windows-latest
# - python-version: "3.11"
# os: macos-latest # Consistently 10min+ slower than all other platforms
services:
qdrant:
image: qdrant/qdrant
ports:
- 6333:6333
steps:
- uses: actions/checkout@v4
- name: ♻️ Cache models
# if: ${{ matrix.python-version != '3.10' }}
uses: actions/cache@v3
with:
path: models
key: ${{ runner.os }}-models
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pipx install hatch
- name: Test with coverage
run: |
hatch run test
- name: Rename coverage per os/version
run: mv .coverage ".coverage.${{ matrix.os }}.${{ matrix.python-version }}"
- name: ☂️ Upload coverage files
uses: actions/upload-artifact@v3
if: ${{ matrix.os == 'ubuntu-latest' }}
with:
name: coverage
path: .coverage.*
publish-coverage:
name: ☂️ Publish coverage
needs: [ tests ]
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Get coverage files
uses: actions/download-artifact@v3
with:
name: coverage
path: coverage
- run: pip install coverage[toml] smokeshow
- run: ls -la coverage
- run: coverage combine coverage
- run: coverage report
- run: coverage html --show-contexts --title "☂️ Coverage for vemonet/libre-chat [${{ github.sha }}]"
- name: Store coverage HTML
uses: actions/upload-artifact@v3
with:
name: coverage-html
path: htmlcov
- run: smokeshow upload htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 90
SMOKESHOW_GITHUB_CONTEXT: coverage
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}
publish-docs:
name: 📚 Update docs website
if: github.event_name != 'pull_request'
needs: [ tests, codeql ]
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: pip install ".[doc]"
- name: Deploy mkdocs on GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mkdocs build -f docs/mkdocs.yml -d dist # mkdocs gh-deploy dont support new pages
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './docs/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
publish-docker:
name: 🐳 Publish docker image
needs: [ tests, codeql ]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write # This is used to complete the identity challenge with sigstore/fulcio
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Enabling the cache causes the build to go out of storage space
# - name: ♻️ Cache models
# uses: actions/cache@v3
# with:
# path: models
# key: ${{ runner.os }}-models
# Install the cosign tool except on PR
- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@v3.1.1
with:
cosign-release: 'v2.1.1'
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
# Login against a Docker registry except on PR
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
# Build and push Docker image with Buildx (don't push on PR)
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Sign the resulting Docker image digest except on PRs https://github.com/sigstore/cosign
- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
# Commented because it was hanging for 20min, probably servers issues
codeql:
name: 🔎 CodeQL analysis
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: python
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
================================================
FILE: .gitignore
================================================
models/
vectorstore/
embeddings/
data/
gradio_cached_examples/
sentence-transformers/
try-*/
tests/tmp/
docker-compose.prod.yml
/main.py
documents/*.txt
documents/*.eml
docs/dist/
# Python artefacts
build/
*.egg-info
.eggs/
dist/
__pycache__/
.pytest_cache/
.ruff_cache/
.mypy_cache/
.coverage*
coverage.xml
coverage/
# Virtual envs
.venv/
venv/
.env
# Notebooks
.ipynb_checkpoints
.virtual_documents/
.cache/
.config/
.ipython/
.jupyter/
.local/
.npm/
.bash_history
__pycache__/
# MacOS
.DS_Store
# IDEs
.idea/
.vscode/
================================================
FILE: .pre-commit-config.yaml
================================================
# See https://pre-commit.com for more information
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
name: " 🐘 Check for added large files"
- id: check-toml
name: " ✔️ Check TOML"
- id: check-yaml
name: " ✔️ Check YAML"
args:
- --unsafe
- id: check-json
name: " ✔️ Check JSON"
- id: end-of-file-fixer
name: " 🪚 Fix end of files"
- id: trailing-whitespace
name: " ✂️ Trim trailing whitespaces"
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
name: " ✒️ Formatting code with Black"
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.277
hooks:
- id: ruff
name: " ⚡️ Formatting code with Ruff"
args:
- --fix
ci:
autofix_commit_msg: 🎨 [pre-commit] Auto format
autoupdate_commit_msg: ⬆ [pre-commit] pre-commit auto update
================================================
FILE: CITATION.cff
================================================
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- orcid: https://orcid.org/0000-0002-1501-1082
email: vincent.emonet@gmail.com
given-names: Vincent Emonet
# affiliation: Institute of Data Science, Maastricht University
title: "Libre Chat"
repository-code: https://github.com/vemonet/libre-chat
date-released: 2023-07-26
url: https://pypi.org/project/libre-chat
# doi: 10.48550/arXiv.2206.13787
================================================
FILE: Dockerfile
================================================
ARG BASE_IMAGE=nvcr.io/nvidia/cuda:12.1.0-runtime-ubuntu22.04
# ARG BASE_IMAGE=python:3.11
# 2.7GB cf. https://ngc.nvidia.com/catalog/containers/nvidia:cuda
# ARG BASE_IMAGE=nvcr.io/nvidia/pytorch:23.06-py3
# 8.5GB cf. https://ngc.nvidia.com/catalog/containers/nvidia:pytorch
# CUDA image: https://github.com/oobabooga/text-generation-webui/blob/main/docker/Dockerfile
FROM ${BASE_IMAGE}
ARG DEBIAN_FRONTEND=noninteractive
ENV LIBRECHAT_WORKERS=1
# CUDA image requires to install python
RUN apt-get update && \
apt-get install -y software-properties-common git vim build-essential python3-dev wget unzip && \
wget https://bootstrap.pypa.io/get-pip.py && \
python3 get-pip.py && \
rm get-pip.py && \
pip3 install --upgrade pip
# Install app in /app
WORKDIR /app
# Pre-install requirements to use cache when re-building
ADD scripts/requirements.txt .
RUN pip3 install -r requirements.txt && \
rm requirements.txt
ADD . .
RUN pip3 install -e .[gpu]
# We use /data as workdir for models, embeddings, vectorstore
WORKDIR /data
VOLUME [ "/data" ]
ENTRYPOINT [ "/app/scripts/start.sh" ]
================================================
FILE: LICENSE.txt
================================================
MIT License
Copyright (c) 2023-present Vincent Emonet <vincent.emonet@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<div align="center">
# <span><img height="30" src="https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo.png"></span> Libre Chat
[](https://github.com/vemonet/libre-chat/actions/workflows/test.yml) [](https://coverage-badge.samuelcolvin.workers.dev/redirect/vemonet/libre-chat)
[](https://pypi.org/project/libre-chat/)
[](https://pypi.org/project/libre-chat/)
[](https://github.com/vemonet/libre-chat/blob/main/LICENSE.txt) [](https://github.com/vemonet/libre-chat/fork)
Easily configure and deploy a **fully self-hosted chatbot web service** based on open source Large Language Models (LLMs), such as [Mixtral](https://mistral.ai/news/mixtral-of-experts) or [Llama 2](https://ai.meta.com/llama/), without the need for knowledge in machine learning.
</div>
- 🌐 Free and Open Source chatbot web service with UI and API.
- 🏡 Fully self-hosted, not tied to any service, and offline capable. Forget about API keys! Models and embeddings can be pre-downloaded, and the training and inference processes can run off-line if necessary.
- 🔌 Web API described using OpenAPI specs: GET/POST operations, websocket for streaming response
- 🪶 Chat web UI working well on desktop and mobile, with streaming response, and markdown rendering. Alternative gradio-based UI also available.
- 🚀 Easy to setup, no need to program, just configure the service with a [YAML](https://yaml.org/) file, and start it with 1 command
- 📦 Available as a `pip` package 🐍, or `docker` image 🐳
- 🐌 No need for GPU, this will work even on your laptop CPU! That said, just running on CPUs can be quite slow (up to 1min to answer a documents-base question on recent laptops).
- 🦜 Powered by [`LangChain`](https://python.langchain.com) and [`llama.cpp`](https://github.com/ggerganov/llama.cpp) to perform inference locally.
- 🤖 Various types of agents can be deployed:
- **💬 Generic conversation**: do not need any additional training, just configure settings such as the template prompt
- **📚 Documents-based question answering** (experimental): automatically build similarity vectors from documents uploaded through the API UI, the chatbot will use them to answer your question, and return which documents were used to generate the answer (PDF, CSV, HTML, JSON, markdown, and more supported).
- 🔍 Readable logs to understand what is going on.
## 📖 Documentation
For more details on how to use Libre Chat check the documentation at **[vemonet.github.io/libre-chat](http://vemonet.github.io/libre-chat)**


## 🏗️ Work in progress
> [!WARNING]
> This project is a work in progress, use it with caution.
Those checkpoints are features we plan to work on in the future, feel free to let us know in the issues if you have any comment or request.
- [x] Stream response to the websocket to show words as they are generated
- [ ] Add button to let the user stop the chatbot generation
- [ ] Add authentication mechanisms? (OAuth/OpenID Connect) https://github.com/vemonet/libre-chat/issues/5
- [ ] Add conversational history? https://milvus.io/blog/conversational-memory-in-langchain.md
- [ ] Add an admin dashboard web UI to enable users to upload/inspect/delete documents for QA, see/edit the config of the chatbot.
- [ ] Kubernetes deployment (Helm chart?)
## 🐳 Deploy with docker
If you just want to quickly deploy it using the pre-trained model `Mixtral-8x7B-Instruct`, you can use docker:
```bash
docker run -it -p 8000:8000 ghcr.io/vemonet/libre-chat:main
```
You can configure the deployment using environment variables. For this using a `docker compose` and a `.env` file is easier, first create the `docker-compose.yml` file:
```yaml
version: "3"
services:
libre-chat:
image: ghcr.io/vemonet/libre-chat:main
volumes:
# ⚠️ Share folders from the current directory to the /data dir in the container
- ./chat.yml:/data/chat.yml
- ./models:/data/models
- ./documents:/data/documents
- ./embeddings:/data/embeddings
- ./vectorstore:/data/vectorstore
ports:
- 8000:8000
```
And create a `chat.yml` file with your configuration in the same folder as the `docker-compose.yml`:
```yaml
llm:
model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
model_download: https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
temperature: 0.01 # Config how creative, but also potentially wrong, the model can be. 0 is safe, 1 is adventurous
max_new_tokens: 1024 # Max number of words the LLM can generate
# Always use input for the human input variable with a generic agent
prompt_variables: [input, history]
prompt_template: |
Your are an assistant, please help me
{history}
User: {input}
AI Assistant:
vector:
vector_path: null # Path to the vectorstore to do QA retrieval, e.g. ./vectorstore/db_faiss
# Set to null to deploy a generic conversational agent
vector_download: null
embeddings_path: ./embeddings/all-MiniLM-L6-v2 # Path to embeddings used to generate the vectors, or use directly from HuggingFace: sentence-transformers/all-MiniLM-L6-v2
embeddings_download: https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/all-MiniLM-L6-v2.zip
documents_path: ./documents # Path to documents to vectorize
chunk_size: 500 # Maximum size of chunks, in terms of number of characters
chunk_overlap: 50 # Overlap in characters between chunks
chain_type: stuff # Or: map_reduce, reduce, map_rerank. More details: https://docs.langchain.com/docs/components/chains/index_related_chains
search_type: similarity # Or: similarity_score_threshold, mmr. More details: https://python.langchain.com/docs/modules/data_connection/retrievers/vectorstore
return_sources_count: 2 # Number of sources to return when generating an answer
score_threshold: null # If using the similarity_score_threshold search type. Between 0 and 1
info:
title: "Libre Chat"
version: "0.1.0"
description: |
Open source and free chatbot powered by [LangChain](https://python.langchain.com) and [llama.cpp](https://github.com/ggerganov/llama.cpp)
examples:
- What is the capital of the Netherlands?
- Which drugs are approved by the FDA to mitigate Alzheimer symptoms?
- How can I create a logger with timestamp using python logging?
favicon: https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo.png
repository_url: https://github.com/vemonet/libre-chat
public_url: https://chat.semanticscience.org
contact:
name: Vincent Emonet
email: vincent.emonet@gmail.com
license_info:
name: MIT license
url: https://raw.github.com/vemonet/libre-chat/main/LICENSE.txt
```
Finally start your chat service with:
```bash
docker compose up
```
## 📦️ Usage with pip
This package requires Python >=3.8, simply install it with `pipx` or `pip`:
```bash
pip install libre-chat
```
### ⌨️ Use as a command-line interface
You can easily start a new chat web service including UI and API using your terminal:
```bash
libre-chat start
```
Provide a specific config file:
```bash
libre-chat start config/chat-vectorstore-qa.yml
```
For re-build of the vectorstore:
```bash
libre-chat build --vector vectorstore/db_faiss --documents documents
```
Get a full rundown of the available options with:
```bash
libre-chat --help
```
### 🐍 Use with python
Or you can use this package in python scripts:
```python
import logging
import uvicorn
from libre_chat import ChatConf, ChatEndpoint, Llm
logging.basicConfig(level=logging.getLevelName("INFO"))
conf = ChatConf(
model_path="./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf",
vector_path=None
)
llm = Llm(conf=conf)
print(llm.query("What is the capital of the Netherlands?"))
# Create and deploy a FastAPI app based on your LLM
app = ChatEndpoint(llm=llm, conf=conf)
uvicorn.run(app)
```
## 🤝 Credits
Inspired by:
- https://github.com/kennethleungty/Llama-2-Open-Source-LLM-CPU-Inference
- https://github.com/lm-sys/FastChat
- https://github.com/liltom-eth/llama2-webui
<a href="https://www.flaticon.com/free-icons/llama" title="llama icons">Llama icons created by Freepik - Flaticon</a>
================================================
FILE: chat.yml
================================================
# Config for a generic conversational agent
llm:
model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
model_download: https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
temperature: 0.01 # Config how creative, but also potentially wrong, the model can be. 0 is safe, 1 is adventurous
max_new_tokens: 1024 # Max number of words the LLM can generate
# Always use input for the human input variable with a generic agent
prompt_variables: [input, history]
prompt_template: |
Your are an assistant, answer the question briefly.
{history}
User: {input}
AI Assistant:
info:
title: "Libre Chat"
version: "0.1.0"
description: |
Open source and free chatbot powered by [LangChain](https://python.langchain.com) and [llama.cpp](https://github.com/ggerganov/llama.cpp)
examples:
- What is the capital of the Netherlands?
- Which drugs are approved by the FDA to mitigate Alzheimer symptoms?
- How can I create a logger with timestamp using python logging?
favicon: https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo.png
repository_url: https://github.com/vemonet/libre-chat
public_url: https://chat.semanticscience.org
contact:
name: Vincent Emonet
email: vincent.emonet@gmail.com
license_info:
name: MIT license
url: https://raw.github.com/vemonet/libre-chat/main/LICENSE.txt
================================================
FILE: config/chat-conversation.yml
================================================
# Config for a generic conversational agent
llm:
model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
model_download: https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
temperature: 0.01 # Config how creative, but also potentially wrong, the model can be. 0 is safe, 1 is adventurous
max_new_tokens: 1024 # Max number of words the LLM can generate
# Always use input for the human input variable with a generic agent
prompt_variables: [input, history]
prompt_template: |
Your are an assistant, answer the question briefly.
{history}
User: {input}
AI Assistant:
info:
title: "Libre Chat"
version: "0.1.0"
description: |
Open source and free chatbot powered by [LangChain](https://python.langchain.com) and [llama.cpp](https://github.com/ggerganov/llama.cpp)
examples:
- What is the capital of the Netherlands?
- Which drugs are approved by the FDA to mitigate Alzheimer symptoms?
- How can I create a logger with timestamp using python logging?
favicon: https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo.png
repository_url: https://github.com/vemonet/libre-chat
public_url: https://chat.semanticscience.org
contact:
name: Vincent Emonet
email: vincent.emonet@gmail.com
license_info:
name: MIT license
url: https://raw.github.com/vemonet/libre-chat/main/LICENSE.txt
================================================
FILE: config/chat-vectorstore-qa.yml
================================================
# Config for a Question Answering (qa) agent
# Will answer based on provided documents, and return which docs was used to answer the question
llm:
model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
model_download: https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
temperature: 0.01 # Config how creative (but also potentially wrong) the model can be. 0 is safe, 1 is adventurous
max_new_tokens: 1024 # Max number of words the LLM can generate
prompt_variables: ["question", "context"]
prompt_template: |
Use the following pieces of information to answer the user's question.
If you don't know the answer, just say that you don't know, don't try to make up an answer.
Context: {context}
Question: {question}
Only return the helpful answer below and nothing else.
Helpful answer:
vector:
# vector_path: http://qdrant:6333
vector_path: ./vectorstore/db_faiss # Path to the vectorstore to do QA retrieval
vector_download: null
embeddings_path: ./embeddings/all-MiniLM-L6-v2 # Embeddings used to generate the vectors. To use from HF: sentence-transformers/all-MiniLM-L6-v2
embeddings_download: https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/all-MiniLM-L6-v2.zip
documents_path: ./documents # Path to documents to vectorize
# When vectorizing we split the text up into small, semantically meaningful chunks (often sentences):
chunk_size: 500 # Maximum size of chunks, in terms of number of characters
chunk_overlap: 50 # Overlap in characters between chunks
chain_type: stuff # Or: map_reduce, reduce, map_rerank. More details: https://docs.langchain.com/docs/components/chains/index_related_chains
search_type: similarity # Or: similarity_score_threshold, mmr. More details: https://python.langchain.com/docs/modules/data_connection/retrievers/vectorstore
return_sources_count: 2 # Number of sources to return when generating an answer
score_threshold: null # If using the similarity_score_threshold search_type. Between 0 and 1
info:
title: "Libre Chat"
version: "0.1.0"
description: |
Open source and free **question-answering** chatbot powered by [LangChain](https://python.langchain.com) and [llama.cpp](https://github.com/ggerganov/llama.cpp)
examples:
- What is the capital of the Netherlands?
- Which drugs are approved by the FDA to mitigate Alzheimer symptoms?
- What was the GDP of France in 1998?
favicon: https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo.png
repository_url: https://github.com/vemonet/libre-chat
public_url: https://chat.semanticscience.org
contact:
name: "Vincent Emonet"
email: "vincent.emonet@gmail.com"
license_info:
name: "MIT license"
url: "https://raw.github.com/vemonet/libre-chat/main/LICENSE.txt"
workers: 4
================================================
FILE: docker-compose.yml
================================================
version: "3"
services:
libre-chat:
# depends_on: [qdrant]
build: .
# image: ghcr.io/vemonet/libre-chat:main
volumes:
- ./config/chat-vectorstore-qa.yml:/data/chat.yml
# - ./chat.yml:/data/chat.yml
- ./data/models:/data/models
- ./data/documents:/data/documents
- ./data/embeddings:/data/embeddings
- ./data/vectorstore:/data/vectorstore
# - ./data:/data # Or directly share the data directory with chat.yml, and folders for models, vectorstore, etc
shm_size: '16g'
# ports:
# - 8000:8000
# entrypoint: uvicorn scripts.main:app
deploy: # Enable GPU in the container
resources:
reservations:
devices:
- driver: nvidia
count: 3
capabilities: [gpu]
environment:
- LIBRECHAT_WORKERS=1
# For deployment with nginx-proxy https://github.com/nginx-proxy/nginx-proxy
- VIRTUAL_HOST=chat.semanticscience.org
- LETSENCRYPT_HOST=chat.semanticscience.org
- VIRTUAL_PORT=8000
# - CUDA_VISIBLE_DEVICES=0 # Limit which GPU is made available
# Configuring proxy manually is required to access internet within UM network
- HTTP_PROXY=http://proxy.unimaas.nl:3128
- HTTPS_PROXY=http://proxy.unimaas.nl:3128
- http_proxy=http://proxy.unimaas.nl:3128
- https_proxy=http://proxy.unimaas.nl:3128
- NO_PROXY=127.0.0.1,localhost,137.120.0.0/16,qdrant
# Containers deployed publicly need to be on the nginx network
networks:
- nginx
# qdrant:
# # https://hub.docker.com/r/qdrant/qdrant/tags
# image: qdrant/qdrant:v1.5.1
# restart: unless-stopped
# volumes:
# - ./data/vectorstore/qdrant:/qdrant/storage
# # - ./scripts/qdrant_config.yml:/qdrant/config/production.yaml
# environment:
# - QDRANT_ALLOW_RECOVERY_MODE=true
# # - VIRTUAL_HOST=qdrant.137.120.31.148.nip.io
# # - LETSENCRYPT_HOST=qdrant.137.120.31.148.nip.io
# # - VIRTUAL_PORT=6333
# # ports:
# # - 6333:6333
# # command:
# # - ./qdrant --config-path /qdrant/qdrant_config.yml
# networks:
# - nginx
# Also required to deploy containers publicly
networks:
nginx:
name: nginx
external: true
================================================
FILE: docs/docs/ChatConf.md
================================================
# Chat Config
::: libre_chat.conf.ChatConf
================================================
FILE: docs/docs/ChatEndpoint.md
================================================
# LLM Endpoint
::: libre_chat.endpoint.ChatEndpoint
================================================
FILE: docs/docs/ChatRouter.md
================================================
# Chat Router
::: libre_chat.router.ChatRouter
================================================
FILE: docs/docs/Llm.md
================================================
# LLM
::: libre_chat.llm.Llm
================================================
FILE: docs/docs/assets/custom.css
================================================
code.highlight {
font-size: 18px;
}
================================================
FILE: docs/docs/configure-conversation.md
================================================
Create a `chat.yml` file with your configuration before starting the web service.
Below is an example of configuration using the Mixtral GGUF model, without vectorstore, to deploy a **generic conversational chatbot**
```yaml title="chat.yml"
llm:
model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf # (1)
model_download: https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
temperature: 0.01 # Config how creative, but also potentially wrong, the model can be. 0 is safe, 1 is adventurous
max_new_tokens: 1024 # Max number of words the LLM can generate
# Always use input for the human input variable with a generic agent
prompt_variables: [input, history]
prompt_template: |
Your are an assistant, please help me
{history}
User: {input}
AI Assistant:
info:
title: "Libre Chat"
version: "0.1.0"
description: |
Open source and free chatbot powered by [LangChain](https://python.langchain.com) and [llama.cpp](https://github.com/ggerganov/llama.cpp)
examples:
- What is the capital of the Netherlands?
- Which drugs are approved by the FDA to mitigate Alzheimer symptoms?
- How can I create a logger with timestamp using python logging?
favicon: https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo.png
repository_url: https://github.com/vemonet/libre-chat
public_url: https://chat.semanticscience.org
contact:
name: Vincent Emonet
email: vincent.emonet@gmail.com
license_info:
name: MIT license
url: https://raw.github.com/vemonet/libre-chat/main/LICENSE.txt
workers: 4
```
1. We recommend to predownload the files, but you can provide download URLs that will be used if the files are not present
================================================
FILE: docs/docs/configure-documents-qa.md
================================================
!!! warning "Experimental"
Documents-based question answering is still experimental and subject to changes.
The deployment can be configured from a YAML file: paths to the model and vectorstore, model settings, web services infos. Create a `chat.yml` file with your configuration before starting the web service.
Libre Chat can be used to train and deploy a **documents-based question answering chatbot**
It requires to deploy a Qdrant similarity search service beside Libre Chat. We recommend to depoy the 2 services with a [`docker-compose.yml`](https://github.com/vemonet/libre-chat/blob/main/docker-compose.yml) file.
When starting the service Libre Chat will automatically check if the `vectorstore` is already available, if not, it will build it from the documents provided in the directory available at the given `documents_path`.
Once the web service is up you can easily upload more documents through the API UI (green icon at the top right of the chatbot web UI). Zip files will be automatically unzipped, and the vectorstore will be automatically rebuilt with all the files uploaded to the server. You will also find a call to get the list of all the documents uploaded to the server. You can prevent unwanted users to add files by adding a pass key using the environment variable `LIBRECHAT_ADMIN_KEY`
??? abstract "File types supported"
Libre Chat will automatically vectorize the file types below. Let us know if you need anything else in the [issues](https://github.com/vemonet/libre-chat/issues).
| File type | Pattern |
| -------------------------- | ----------------------- |
| PDF | `*.pdf` |
| CSV/TSV/PSV | `*.csv`/`*.tsv`/`*.psv` |
| JSON | `*.json*` |
| HTML | `.?xhtm?l` |
| Markdown | `*.md*` |
| Text | `*.txt` |
| Open Document Format (ODT) | `*.odt` |
| Word documents | `*.doc?x` |
| Excel | `*.xls?x` |
| PowerPoint | `*.ppt?x` |
| ePub | `*.epub` |
| Email | `*.eml` |
| EverNote | `*.enex` |
??? example "Use custom document loaders"
Custom document loaders can be defined when instantiating the `Llm` class:
```python
from langchain.document_loaders import (
CSVLoader,
EverNoteLoader,
JSONLoader,
PyPDFLoader,
TextLoader,
UnstructuredEmailLoader,
UnstructuredEPubLoader,
UnstructuredHTMLLoader,
UnstructuredMarkdownLoader,
UnstructuredODTLoader,
UnstructuredPowerPointLoader,
UnstructuredWordDocumentLoader,
UnstructuredExcelLoader,
)
from libre_chat import Llm, parse_conf
loaders = [
{"glob": "*.pdf", "loader_cls": PyPDFLoader},
{"glob": "*.csv", "loader_cls": CSVLoader, "loader_kwargs": {"encoding": "utf8"}},
{"glob": "*.tsv", "loader_cls": CSVLoader, "loader_kwargs": {"encoding": "utf8", "delimiter": "\t"}},
{"glob": "*.psv", "loader_cls": CSVLoader, "loader_kwargs": {"encoding": "utf8", "delimiter": "\\p"}},
{"glob": "*.xls?x", "loader_cls": UnstructuredExcelLoader},
{"glob": "*.?xhtm?l", "loader_cls": UnstructuredHTMLLoader},
{"glob": "*.xml", "loader_cls": UnstructuredHTMLLoader},
{"glob": "*.json*", "loader_cls": JSONLoader},
{"glob": "*.md*", "loader_cls": UnstructuredMarkdownLoader},
{"glob": "*.txt", "loader_cls": TextLoader, "loader_kwargs": {"encoding": "utf8"}},
{"glob": "*.doc?x", "loader_cls": UnstructuredWordDocumentLoader},
{"glob": "*.odt", "loader_cls": UnstructuredODTLoader},
{"glob": "*.ppt?x", "loader_cls": UnstructuredPowerPointLoader},
{"glob": "*.epub", "loader_cls": UnstructuredEPubLoader},
{"glob": "*.eml", "loader_cls": UnstructuredEmailLoader},
{"glob": "*.enex", "loader_cls": EverNoteLoader},
]
llm = Llm(
conf=parse_conf("config/chat-vectorstore-qa.yml"),
document_loaders=loaders
)
```
Below is an example of configuration using the Mixtral GGUF model, with a Faiss vectorstore, to deploy a question answering agent that will source its answers from the documents provided in the `./documents` folder:
```yaml title="chat.yml"
llm:
model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf # (1)
model_download: https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF/resolve/main/mixtral-8x7b-instruct-v0.1.Q2_K.gguf
temperature: 0.01 # Config how creative (but also potentially wrong) the model can be. 0 is safe, 1 is adventurous
max_new_tokens: 1024 # Max number of words the LLM can generate
prompt_variables: ["question", "context"]
prompt_template: |
Use the following pieces of information to answer the user's question.
If you don't know the answer, just say that you don't know, don't try to make up an answer.
Context: {context}
Question: {question}
Only return the helpful answer below and nothing else.
Helpful answer:
vector:
vector_path: ./vectorstore/db_faiss # Path to the vectorstore to do QA retrieval
vector_download: null
embeddings_path: ./embeddings/all-MiniLM-L6-v2 # (2)
embeddings_download: https://public.ukp.informatik.tu-darmstadt.de/reimers/sentence-transformers/v0.2/all-MiniLM-L6-v2.zip
documents_path: ./documents # Path to documents to vectorize (3)
chunk_size: 500 # Maximum size of chunks, in terms of number of characters
chunk_overlap: 50 # Overlap in characters between chunks
chain_type: stuff # (4)
search_type: similarity # (5)
return_sources_count: 2 # Number of sources to return when generating an answer
score_threshold: null # If using the similarity_score_threshold search_type. Between 0 and 1
info:
title: "Libre Chat"
version: "0.1.0"
description: |
Open source and free chatbot powered by [LangChain](https://python.langchain.com) and [llama.cpp](https://github.com/ggerganov/llama.cpp)
examples:
- What is the capital of the Netherlands?
- Which drugs are approved by the FDA to mitigate Alzheimer symptoms?
- What was the GDP of France in 1998?
favicon: https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo.png
repository_url: https://github.com/vemonet/libre-chat
public_url: https://chat.semanticscience.org
contact:
name: "Vincent Emonet"
email: "vincent.emonet@gmail.com"
license_info:
name: "MIT license"
url: "https://raw.github.com/vemonet/libre-chat/main/LICENSE.txt"
workers: 4
```
1. We recommend to predownload the files, but you can provide download URLs that will be used if the files are not present
2. Embeddings used to generate the vectorstore.<br/>You can also directly use embeddings model from HuggingFace:
```yaml
embeddings_path: sentence-transformers/all-MiniLM-L6-v2
```
3. When vectorizing we split the text up into small, semantically meaningful chunks (often sentences)
4. Also available: `map_reduce`, `reduce`, `map_rerank`.<br/>More details at [https://docs.langchain.com/docs/components/chains/index_related_chains](https://docs.langchain.com/docs/components/chains/index_related_chains)
5. Also available: `similarity_score_threshold`, `mmr`.<br/>More details: [https://python.langchain.com/docs/modules/data_connection/retrievers/vectorstore](https://python.langchain.com/docs/modules/data_connection/retrievers/vectorstore)
If no files are found at the path provided, e.g. `model_path`, and a download URL has been defined, e.g. `model_download`, Libre Chat will automatically download the file from the provided URL, and unzip it if it is a `.zip` file.
================================================
FILE: docs/docs/development.md
================================================
<div align="center" markdown="span">
[](https://pypi.org/project/libre-chat) [](https://pypi.org/project/libre-chat) [](https://github.com/vemonet/libre-chat/pkgs/container/libre-chat) [](https://github.com/vemonet/libre-chat/fork)
<br />
[](https://github.com/vemonet/libre-chat/actions/workflows/test.yml) [](https://coverage-badge.samuelcolvin.workers.dev/redirect/vemonet/libre-chat) [](https://github.com/vemonet/libre-chat/actions/workflows/release.yml)
<br />
[{ loading=lazy .off-glb }](https://github.com/pypa/hatch) [{ loading=lazy .off-glb }](https://github.com/astral-sh/ruff) [{ loading=lazy .off-glb }](https://github.com/psf/black) [{ loading=lazy .off-glb }](https://github.com/python/mypy)
</div>
## 📥 Install for development
Clone the repository and go to the project folder:
```bash
git clone https://github.com/vemonet/libre-chat
cd libre-chat
```
For development we use [Hatch](https://hatch.pypa.io), it will automatically handle virtual environments, and make sure all dependencies are installed when you run a script in the project. Install it with `pipx` or `pip`:
```bash
pipx install hatch
```
??? info "Optionally you can enable `hatch` terminal completion"
See the [official documentation](https://hatch.pypa.io/latest/cli/about/#tab-completion) for more details. For ZSH you can run these commands:
```bash
_HATCH_COMPLETE=zsh_source hatch > ~/.hatch-complete.zsh
echo ". ~/.hatch-complete.zsh" >> ~/.zshrc
```
## 🧑💻 Development workflow
Start a conversational chat web service, without vectorstore:
```bash
hatch run dev
```
Start a documents-based question answering service, using a vectorstore:
```bash
hatch run vector
```
Use the CLI to build a vectorstore at a specific path:
```bash
hatch run libre-llm build --documents documents2 --vector vectorstore/db2
```
## ✅ Run the tests
Make sure the existing tests still work by running the test suite, mypy, and linting checks. .
Run the tests locally:
```bash
hatch run test
```
Run only a specific test, and display all logs:
```bash
hatch run test tests/test_api.py::test_post_prompt_conversation -s
```
??? example "Run the tests on the different versions of python available on your machine"
Not required as it is done by the GitHub Actions workflow, but can be useful for debugging:
```bash
hatch run all:test
```
## 📖 Generate the docs
The documentation (this website) is automatically generated and published by a GitHub Actions workflow from the markdown files in the `docs/` folder, and python `docstring` comments.
To check the documentation website locally, serve it with:
```bash
hatch run docs
```
## ♻️ Reset the environment
In case you are facing issues with dependencies not updating properly you can easily reset the virtual environment with:
```bash
hatch env prune
```
Manually trigger the installation of dependencies in a local virtual environment (done automatically when you run any script):
```bash
hatch -v env create
```
Enter a new shell with the environment activated:
```bash
hatch shell
```
## 🏷️ Publish a new release
The deployment of new releases is done automatically by a GitHub Actions workflow when a new release is created on GitHub. To release a new version:
1. Make sure the `PYPI_TOKEN` secret has been defined in the GitHub repository (in Settings > Secrets > Actions). You can get an API token from PyPI at [pypi.org/manage/account](https://pypi.org/manage/account).
2. Increment the `version` number in the `src/libre_chat/__init__.py` file:
```bash
hatch version 0.1.0
# Or bump using semver: patch, minor, major
hatch version patch
```
3. Commit, push, and create a new release on GitHub, which will automatically trigger a workflow to publish the new release to PyPI.
??? bug "Or perform the release locally"
1. Update the version:
```bash
hatch version 0.1.0
# Or bump using semver: patch, minor, major
hatch version patch
```
2. Build and publish:
```bash
hatch build
hatch publish
```
3. Create the release on GitHub, [manually](https://github.com/vemonet/libre-chat/releases/new) or with the [`gh` CLI](https://cli.github.com/):
```bash
gh release create
```
================================================
FILE: docs/docs/index.md
================================================
<div align="center" markdown="span">
[](https://pypi.org/project/libre-chat) [](https://pypi.org/project/libre-chat) [](https://github.com/vemonet/libre-chat/pkgs/container/libre-chat) [](https://github.com/vemonet/libre-chat/blob/main/LICENSE.txt)
<br />
[](https://github.com/vemonet/libre-chat/actions/workflows/test.yml) [](https://coverage-badge.samuelcolvin.workers.dev/redirect/vemonet/libre-chat)
<br /><br />
Easily configure and deploy a **fully self-hosted chatbot web service** based on open source Large Language Models (LLMs), such as [Mixtral](https://mistral.ai/news/mixtral-of-experts) or [Llama 2](https://ai.meta.com/llama/), without the need for knowledge in machine learning.
</div>
- 🌐 Free and Open Source chatbot web service with UI and API.
- 🏡 Fully self-hosted, not tied to any service, and offline capable. Forget about API keys! Models and embeddings can be pre-downloaded, and the training and inference processes can run off-line if necessary.
- 🔌 Web API described using OpenAPI specs: GET/POST operations, websocket for streaming response
- 🪶 Chat web UI working well on desktop and mobile, with streaming response, and markdown rendering. Alternative gradio-based UI also available.
- 🚀 Easy to setup, no need to program, just configure the service with a [YAML](https://yaml.org/) file, and start it with 1 command
- 📦 Available as a `pip` package 🐍, or `docker` image 🐳
- 🐌 No need for GPU, this will work even on your laptop CPU! That said, just running on CPUs can be quite slow (up to 1min to answer a documents-base question on recent laptops).
- 🦜 Powered by [`LangChain`](https://python.langchain.com) and [`llama.cpp`](https://github.com/ggerganov/llama.cpp) to perform inference locally.
- 🤖 Various types of agents can be deployed:
- **💬 Generic conversation**: do not need any additional training, just configure settings such as the template prompt
- **📚 Documents-based question answering** (experimental): automatically build similarity vectors from documents uploaded through the API UI, the chatbot will use them to answer your question, and return which documents were used to generate the answer (PDF, CSV, HTML, JSON, markdown, and more supported).
- 🔍 Readable logs to understand what is going on.


!!! warning "Early stage"
Development on this project has just started, use it with caution. If you are looking for more mature projects check out the bottom of this page.
## ℹ️ How it works
No need to program! The whole deployment can be configured from a YAML file: paths to the model/documents/vectorstore, model settings, web services infos, etc. Create a `chat.yml` file with your configuration then starts the web service.
1. Install it as a `pip` package 🐍, or create a `docker-compose.yml` file to use the `docker` image 🐳
2. Configure the service in a `chat.yml` file
3. Start the chat web service from the terminal with `libre-chat start` or `docker compose up`. The first time it will take some time to download the model if not already done (models size are around 15+GB)
Seasoned developers can also manipulate LLM models, and deploy the API in python scripts using the `libre_chat` module.
!!! help "Report issues"
Feel free to create [issues on GitHub](https://github.com/vemonet/libre-chat/issues), if you are facing problems, have a question, or would like to see a feature implemented. Pull requests are welcome!
## 📥 Download supported models
All models supported in GGUF format by [`llama.cpp`](https://github.com/ggerganov/llama.cpp) should work. Preferably search for the `Instruct` version of a model (fine-tuned to better follow instructions), e.g.:
* [Mixtral](https://huggingface.co/TheBloke/Mixtral-8x7B-Instruct-v0.1-GGUF)
* [Llama 2](https://huggingface.co/TheBloke/Llama-2-7B-32K-Instruct-GGUF)
!!! Question "Supporting other models"
Let us know if you managed to run other models with Libre Chat, or if you would like to see a specific model supported.
## 🔎 Technical overview
The web service is deployed using a [**⚡ FastAPI**](https://fastapi.tiangolo.com) endpoint. It has 4 routes, plus its [OpenAPI](https://www.openapis.org/) documentation available on `/docs`:
- 📮 `GET` and `POST` on `/prompt` to query the model
- 🔌 Websocket on `/chat` to open a connection with the API, and query the model
- 🖥️ Chatbot web UI served on the root URL `/`, built with Astro, SolidJS, [Tailwind](https://tailwindcss.com) and daisyUI for styling, and [marked](https://marked.js.org/) for markdown rendering.
All files required for querying the model are stored and accessed locally using [**🦜🔗 LangChain**](https://python.langchain.com): the main model binary, the embeddings and documents to create the vectors, and the [vectorstore](https://python.langchain.com/docs/modules/data_connection/vectorstores/).
## 🗺️ More mature projects
If you are looking for more mature tools to play with LLMs locally we recommend to look into those really good projects.
Web UI for chat:
* [HuggingFace chat-ui](https://github.com/huggingface/chat-ui): a Svelte chat web UI. With multiple conversation history, and OIDC login
* [chatbot-ui](https://github.com/mckaywrigley/chatbot-ui): a React chat web UI. With multiple conversation history, no login
* [chat-langchain](https://github.com/langchain-ai/chat-langchain): a React chat web UI for LangChain. Connect well with LangSmith to show trace. No login, no multiple conversation history.
* [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui): A Gradio web UI for Large Language Models, with panels to config the LLM params adapted for experimentation.
* [chainlit](https://github.com/Chainlit/chainlit): build LLM app with your own business logic, with React web UI
* [FastChat](https://github.com/lm-sys/FastChat): platform for training, serving, and evaluating LLMs in an arena, with Gradio web UI.
* [GPT4All](https://gpt4all.io): open-source LLM chatbots that you can run anywhere, with a web UI
* [localGPT](https://github.com/PromtEngineer/localGPT): Chat with your documents on your local device using GPT models
* [ChatDocs](https://github.com/marella/chatdocs): UI to Chat with your documents offline
Run LLM inference locally:
* [LocalAI](https://github.com/mudler/LocalAI): OpenAI compatible API. Self-hosted, community-driven and local-first.
* [vLLM](https://github.com/vllm-project/vllm): A high-throughput and memory-efficient inference and serving engine for LLMs (includes OpenAI-compatible server, requires GPU)
* [ollama](https://github.com/jmorganca/ollama): Get up and running with Llama 2 and other large language models locally
* [llm](https://github.com/simonw/llm): Python library for interacting with Large Language Models, both via remote APIs and models that can be installed and run on your own machine, by Simon Willison (checkout their blog [simonwillison.net](https://simonwillison.net), for a lot of really well written articles about LLMs)
================================================
FILE: docs/docs/use-docker.md
================================================
[](https://github.com/vemonet/libre-chat/pkgs/container/libre-chat)
Libre Chat is available as a [docker image](https://github.com/vemonet/libre-chat/pkgs/container/libre-chat) that will use CUDA when available. It is recommended to use docker for deploying in production as it uses gunicorn to run multiple workers.
## ⚡ Quickstart
If you just want deploy it using the pre-trained Mixtral model, you can use docker:
```bash
docker run -it -p 8000:8000 ghcr.io/vemonet/libre-chat:main
```
!!! Warning "Loading the model takes time"
Downloading the model will take time the first time, you can also pre-download it manually.
If you are using GPU, loading the model when the application starts also takes some time (can take a few minutes)
## ⚙️ Configure with docker compose
1. Create a `chat.yml` file with your chat web service configuration.
2. Create the `docker-compose.yml` in the same folder:
```yaml title="docker-compose.yml"
version: "3"
services:
libre-chat:
image: ghcr.io/vemonet/libre-chat:main
volumes:
# ⚠️ Share files from the current directory to the /data dir in the container
- ./chat.yml:/data/chat.yml
- ./models:/data/models
- ./documents:/data/documents
- ./embeddings:/data/embeddings
- ./vectorstore:/data/vectorstore
ports:
- 8000:8000
environment:
- LIBRECHAT_WORKERS=1
```
3. Start your chat web service with:
```bash
docker compose up
```
??? warning "Using multiple workers"
Using multiple worker is still experimental. When using a documents-based QA chatbot you will need to restart the API after adding new documents to make sure all workers reload the newly built vectorstore.
================================================
FILE: docs/docs/use-pip.md
================================================
[](https://pypi.org/project/libre-chat) [](https://pypi.org/project/libre-chat)
`libre-chat` is tested on Linux, and MacOS, should work on Windows WSL.
!!! Tip "Production deployment"
When deploying in production it is recommended to use [docker](https://www.docker.com), or directly [gunicorn](https://gunicorn.org), to handle many requests. The CLI is mainly used for local testing and building vectorstores.
## 📦 Install
Install from [PyPI](https://pypi.org/project/libre-chat/) with `pipx` or `pip`:
```bash
pip install libre-chat
```
??? Note "Installing on Windows"
We recommend to use WSL or Docker. Otherwise you can install with an extra dependency:
```bash
pip install "libre-chat[windows]"
```
Note there are some issues with the `UnstructuredEmailLoader` on Windows. It uses `unstructured`, which uses [`python-magic`](https://pydigger.com/pypi/python-magic) which fails due to a `ctypes` import.
## ⌨️ Use as a command-line interface
You can easily **start a new chat web service** including UI and API from your terminal. If no arguments are provided it will try to parse a `chat.yml` file in the current directory, or use the default configuration:
```bash
libre-chat start
```
Provide a specific **config file**:
```bash
libre-chat start config/chat-vectorstore-qa.yml
```
Re-build the **vectorstore**:
```bash
libre-chat build --vector vectorstore/db_faiss --documents documents
```
Get a full rundown of the available options with the usual:
```bash
libre-chat --help
```
## 🐍 Use in python scripts
Alternatively, you can use this package in python scripts:
```python title="main.py"
import logging
import uvicorn
from libre_chat import ChatConf, ChatEndpoint, Llm
logging.basicConfig(level=logging.getLevelName("INFO"))
conf = ChatConf(
model_path="./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf",
vector_path=None
)
llm = Llm(conf=conf)
print(llm.query("What is the capital of the Netherlands?"))
# Create and deploy a FastAPI app based on your LLM
app = ChatEndpoint(llm=llm, conf=conf)
uvicorn.run(app)
```
Checkout the [Code reference](/libre-chat/Llm) for more details on the available classes.
================================================
FILE: docs/includes/abbreviations.md
================================================
*[HTML]: Hyper Text Markup Language
*[LLM]: Large Language Model
*[LLMs]: Large Language Models
*[ML]: Machine Learning
*[DL]: Deep Learning
*[QA]: Question Answering
*[API]: Application Programming Interface
*[UI]: User Interface
*[CLI]: Command-Line Interface
*[PyPI]: Python Packaging Index
*[PyPA]: Python Packaging Authority
*[PEP]: Python Enhancement Proposal
*[YAML]: Depending on whom you ask, YAML stands for "Yet Another Markup Language", or "YAML Ain't Markup Language"
*[JSON]: JavaScript Object Notation
*[Faiss]: Faiss is a library for efficient similarity search and clustering of dense vectors. It contains algorithms that search in sets of vectors of any size, up to ones that possibly do not fit in RAM. It also contains supporting code for evaluation and parameter tuning.
*[GGML]: GGML is a C library for machine learning (ML) - the "GG" refers to the initials of its originator (Georgi Gerganov). In addition to defining low-level machine learning primitives (like a tensor type), GGML defines a binary format for distributing large language models (LLMs).
*[GGUF]: GPT-Generated Unified Format, successor to GGML, is a quantization method that allows users to use the CPU to run a LLM, but also offload some of its layers to the GPU for a speed up.
*[GPTQ]: GPTQ is a quantization algorithm that lightly reoptimizes the weights during quantization so that the accuracy loss is compensated relative to a round-to-nearest quantization. 4-bit GPTQ models reduce VRAM usage by about 75%.
*[URL]: Uniform Resource Locator
*[URI]: Uniform Resource Identifier
*[vectorstore]: A vector store takes care of storing embedded data, and performing vector search for you
*[GPU]: Graphics Processing Unit
*[CPU]: Central Processing Unit
*[TPU]: Tensor Processing Unit
*[PDF]: Portable Document Format
*[ZSH]: The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell, and as a command interpreter for shell scripting.
*[BASH]: The Bourne-Again SHell (BASH) is a Unix shell that can be used as an interactive login shell, and as a command interpreter for shell scripting.
*[OpenAPI]: OpenAPI, formerly known as Swagger, is a specification language for HTTP APIs that defines structure and syntax in a way that is not wedded to the programming language the API is created in.
*[JS]: JavaScript
*[TS]: TypeScript
*[CSS]: CSS is the acronym of "Cascading Style Sheets". CSS is a computer language for laying out and structuring web pages (HTML or XML)
*[CSV]: Comma-Separated Value
*[TSV]: Tab-Separated Value
*[PSV]: Pipe-Separated Value
*[ODT]: Open Document Format
================================================
FILE: docs/mkdocs.yml
================================================
site_name: Libre Chat
site_description: API and UI to deploy LLM models
site_author: Vincent Emonet
site_url: https://vemonet.github.io/libre-chat
repo_name: vemonet/libre-chat
repo_url: https://github.com/vemonet/libre-chat
edit_uri: "edit/main/docs/"
copyright: Copyright © 2023 Vincent Emonet
theme:
name: "material"
favicon: assets/logo.png
logo: assets/logo.png
icon:
admonition:
server: material/server
language: en
# https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#primary-color
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: cyan
toggle:
icon: material/weather-night
name: Switch to dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: cyan
toggle:
icon: material/weather-sunny
name: Switch to light mode
features:
- content.code.copy
- content.code.annotate
- content.code.select # Still experimental
# - content.tabs.link
# - header.autohide
# - navigation.expand
- navigation.indexes
# - navigation.instant
- navigation.sections
- navigation.tabs
# - navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
# https://fontawesome.com/icons/
# https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/
nav:
- About:
- About: index.md
- Configure:
- 💬 Conversational agent: configure-conversation.md
- 📚️ Documents-based QA: configure-documents-qa.md
- Deploy:
- 🐳 With Docker: use-docker.md
- 🐍 With pip: use-pip.md
- Advanced:
- 🛠️ Development: development.md
- Code reference:
- LLM: Llm.md
- Chat Config: ChatConf.md
- Chat Endpoint: ChatEndpoint.md
- Chat Router: ChatRouter.md
- Issues: https://github.com/vemonet/libre-chat/issues" target="_blank
plugins:
- search
- open-in-new-tab
- autorefs
- mkdocstrings:
default_handler: python
handlers:
python:
options:
show_source: true
# custom_templates: templates
watch:
- ../src
- docs
markdown_extensions:
- admonition # https://squidfunk.github.io/mkdocs-material/reference/admonitions/#supported-types
- pymdownx.highlight:
anchor_linenums: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- pymdownx.details
- pymdownx.extra
- abbr
- pymdownx.snippets:
auto_append:
- docs/includes/abbreviations.md
- attr_list
- smarty
# - md_in_html
extra_css:
- assets/custom.css
extra:
social:
- icon: fontawesome/brands/python
link: https://pypi.org/project/libre-chat
- icon: fontawesome/brands/docker
link: https://github.com/vemonet/libre-chat/pkgs/container/libre-chat
- icon: fontawesome/brands/github
link: https://github.com/vemonet
================================================
FILE: documents/gdp.csv
================================================
Country Name,Country Code,Year,Value
Arab World,ARB,1968,25760683041.0857
Arab World,ARB,1969,28434203615.4829
Arab World,ARB,1970,31385499664.0672
Arab World,ARB,1971,36426909888.3928
Arab World,ARB,1972,43316056615.4562
Arab World,ARB,1973,55018394945.5825
Arab World,ARB,1974,105145803084.377
Arab World,ARB,1975,116337021938.341
Arab World,ARB,1976,144846175400.488
Arab World,ARB,1977,167308327683.593
Arab World,ARB,1978,183555544342.189
Arab World,ARB,1979,248646206367.003
Arab World,ARB,1980,338177454717.54
Arab World,ARB,1981,348592795413.116
Arab World,ARB,1982,324328753765.3
Arab World,ARB,1983,303962539723.08
Arab World,ARB,1984,307940771858.542
Arab World,ARB,1985,303893618415.542
Arab World,ARB,1986,289029150639.442
Arab World,ARB,1987,312681678329.933
Arab World,ARB,1988,307503035642.516
Arab World,ARB,1989,322325140494.725
Arab World,ARB,1990,446877161735.16
Arab World,ARB,1991,439779177865.334
Arab World,ARB,1992,471163515479.771
Arab World,ARB,1993,476513630620.727
Arab World,ARB,1994,487526906267.398
Arab World,ARB,1995,523759898278.581
Arab World,ARB,1996,578231297757.414
Arab World,ARB,1997,613279452463.065
Arab World,ARB,1998,591525594008.239
Arab World,ARB,1999,643889670873.196
Arab World,ARB,2000,735025140326.516
Arab World,ARB,2001,723282816391.284
Arab World,ARB,2002,729051715403.445
Arab World,ARB,2003,823110541440.464
Arab World,ARB,2004,963862340520.581
Arab World,ARB,2005,1184661549595.13
Arab World,ARB,2006,1404113530800.68
Arab World,ARB,2007,1637573196970.62
Arab World,ARB,2008,2078115659876.48
Arab World,ARB,2009,1795819607113.11
Arab World,ARB,2010,2109645821948.41
Arab World,ARB,2011,2501553648412.73
Arab World,ARB,2012,2741238538444.31
Arab World,ARB,2013,2839626635836.57
Arab World,ARB,2014,2906616435186.9
Arab World,ARB,2015,2563301730344.96
Arab World,ARB,2016,2504702625568.63
Caribbean small states,CSS,1960,2004785088.23708
Caribbean small states,CSS,1961,2169733054.3289
Caribbean small states,CSS,1962,2289494617.50319
Caribbean small states,CSS,1963,2431591781.47075
Caribbean small states,CSS,1964,2626895911.88936
Caribbean small states,CSS,1965,2828615453.30014
Caribbean small states,CSS,1966,3067843648.65076
Caribbean small states,CSS,1967,3293145006.66893
Caribbean small states,CSS,1968,3274645643.10132
Caribbean small states,CSS,1969,3563687634.72661
Caribbean small states,CSS,1970,3920853183.53033
Caribbean small states,CSS,1971,4262673219.74986
Caribbean small states,CSS,1972,4934739944.09331
Caribbean small states,CSS,1973,5390816069.08124
Caribbean small states,CSS,1974,7007906856.32259
Caribbean small states,CSS,1975,8200001223.49872
Caribbean small states,CSS,1976,8414807199.18667
Caribbean small states,CSS,1977,9783471923.0628
Caribbean small states,CSS,1978,9980604018.52617
Caribbean small states,CSS,1979,11435129604.5471
Caribbean small states,CSS,1980,14028282040.6689
Caribbean small states,CSS,1981,15480050142.6008
Caribbean small states,CSS,1982,17287146828.8967
Caribbean small states,CSS,1983,17450456929.571
Caribbean small states,CSS,1984,16436254244.733
Caribbean small states,CSS,1985,16161316057.0401
Caribbean small states,CSS,1986,14445145769.2853
Caribbean small states,CSS,1987,15475346111.2724
Caribbean small states,CSS,1988,16399795081.909
Caribbean small states,CSS,1989,16631954337.8926
Caribbean small states,CSS,1990,17884432804.7622
Caribbean small states,CSS,1991,17668489746.0183
Caribbean small states,CSS,1992,17396950391.3169
Caribbean small states,CSS,1993,18254627213.7717
Caribbean small states,CSS,1994,19289605582.54
Caribbean small states,CSS,1995,21134854978.4877
Caribbean small states,CSS,1996,23041792540.1097
Caribbean small states,CSS,1997,25732097913.4072
Caribbean small states,CSS,1998,28249856028.3436
Caribbean small states,CSS,1999,30022320518.2375
Caribbean small states,CSS,2000,32256663837.939
Caribbean small states,CSS,2001,33176931053.7493
Caribbean small states,CSS,2002,34949444322.9159
Caribbean small states,CSS,2003,37500825974.468
Caribbean small states,CSS,2004,41178984265.2063
Caribbean small states,CSS,2005,46656114031.8673
Caribbean small states,CSS,2006,52416498942.5771
Caribbean small states,CSS,2007,58371461971.2934
Caribbean small states,CSS,2008,66596542818.2652
Caribbean small states,CSS,2009,55887477076.4319
Caribbean small states,CSS,2010,60945499584.2842
Caribbean small states,CSS,2011,66197591876.8357
Caribbean small states,CSS,2012,70647852492.6344
Caribbean small states,CSS,2013,71284814647.9944
Caribbean small states,CSS,2014,71392784816.8765
Caribbean small states,CSS,2015,69516216246.9776
Caribbean small states,CSS,2016,66707362091.378
Central Europe and the Baltics,CEB,1990,256391119869.734
Central Europe and the Baltics,CEB,1991,242844938128.091
Central Europe and the Baltics,CEB,1992,260069791613.87
Central Europe and the Baltics,CEB,1993,274192522357.49
Central Europe and the Baltics,CEB,1994,311016433450.634
Central Europe and the Baltics,CEB,1995,386483907816.169
Central Europe and the Baltics,CEB,1996,412961998506.857
Central Europe and the Baltics,CEB,1997,409177928370.546
Central Europe and the Baltics,CEB,1998,447675022512.855
Central Europe and the Baltics,CEB,1999,434158663027.362
Central Europe and the Baltics,CEB,2000,427826438350.621
Central Europe and the Baltics,CEB,2001,468434348786.6
Central Europe and the Baltics,CEB,2002,527515753116.019
Central Europe and the Baltics,CEB,2003,634885340805.817
Central Europe and the Baltics,CEB,2004,763009793236.826
Central Europe and the Baltics,CEB,2005,886484956908.554
Central Europe and the Baltics,CEB,2006,1002687667760.64
Central Europe and the Baltics,CEB,2007,1262018642144.73
Central Europe and the Baltics,CEB,2008,1524160100132.74
Central Europe and the Baltics,CEB,2009,1281584484589.85
Central Europe and the Baltics,CEB,2010,1313815361437.81
Central Europe and the Baltics,CEB,2011,1446816247840
Central Europe and the Baltics,CEB,2012,1351348603800.8
Central Europe and the Baltics,CEB,2013,1422416711189.95
Central Europe and the Baltics,CEB,2014,1463360359358.05
Central Europe and the Baltics,CEB,2015,1285572776919.07
Central Europe and the Baltics,CEB,2016,1312157690492.89
Early-demographic dividend,EAR,1960,152378454683.878
Early-demographic dividend,EAR,1961,153311493572.423
Early-demographic dividend,EAR,1962,158916755209.822
Early-demographic dividend,EAR,1963,168090855529.874
Early-demographic dividend,EAR,1964,192550820717.691
Early-demographic dividend,EAR,1965,209918435940.819
Early-demographic dividend,EAR,1966,207192127927.611
Early-demographic dividend,EAR,1967,217434760704.496
Early-demographic dividend,EAR,1968,235619309639.936
Early-demographic dividend,EAR,1969,263378529355.326
Early-demographic dividend,EAR,1970,279193504764.852
Early-demographic dividend,EAR,1971,301585808664.471
Early-demographic dividend,EAR,1972,331593747605.821
Early-demographic dividend,EAR,1973,424413916047.314
Early-demographic dividend,EAR,1974,595404849057.397
Early-demographic dividend,EAR,1975,639433225164.46
Early-demographic dividend,EAR,1976,698259612679.885
Early-demographic dividend,EAR,1977,781303040617.689
Early-demographic dividend,EAR,1978,864922011213.364
Early-demographic dividend,EAR,1979,1051436948147.1
Early-demographic dividend,EAR,1980,1295401864990.77
Early-demographic dividend,EAR,1981,1447517165740.9
Early-demographic dividend,EAR,1982,1379491226141.91
Early-demographic dividend,EAR,1983,1392376333198.89
Early-demographic dividend,EAR,1984,1372231409900.51
Early-demographic dividend,EAR,1985,1405011033226.21
Early-demographic dividend,EAR,1986,1425838794352.93
Early-demographic dividend,EAR,1987,1436813007738.15
Early-demographic dividend,EAR,1988,1545908814609.4
Early-demographic dividend,EAR,1989,1579986814759.15
Early-demographic dividend,EAR,1990,1819896194901.83
Early-demographic dividend,EAR,1991,1928919471259.18
Early-demographic dividend,EAR,1992,2116361374325.42
Early-demographic dividend,EAR,1993,2322855172109.96
Early-demographic dividend,EAR,1994,2432160774435.76
Early-demographic dividend,EAR,1995,2482548280990.99
Early-demographic dividend,EAR,1996,2709494744622.69
Early-demographic dividend,EAR,1997,2893194179712.89
Early-demographic dividend,EAR,1998,2846298375892.1
Early-demographic dividend,EAR,1999,3019867129834.06
Early-demographic dividend,EAR,2000,3275876559584.92
Early-demographic dividend,EAR,2001,3235006813827.87
Early-demographic dividend,EAR,2002,3144218788340.61
Early-demographic dividend,EAR,2003,3516151323703.34
Early-demographic dividend,EAR,2004,4090111659563.41
Early-demographic dividend,EAR,2005,4767620344026.82
Early-demographic dividend,EAR,2006,5462304388463.2
Early-demographic dividend,EAR,2007,6488823566895.55
Early-demographic dividend,EAR,2008,7317501470600.68
Early-demographic dividend,EAR,2009,7045911611995.23
Early-demographic dividend,EAR,2010,8514322770067.29
Early-demographic dividend,EAR,2011,9564928622914.71
Early-demographic dividend,EAR,2012,9974410005994.34
Early-demographic dividend,EAR,2013,10160722334942.3
Early-demographic dividend,EAR,2014,10529872000158.3
Early-demographic dividend,EAR,2015,10194970465551.6
Early-demographic dividend,EAR,2016,10401989026722.8
East Asia & Pacific,EAS,1960,153611968410.868
East Asia & Pacific,EAS,1961,154058410879.326
East Asia & Pacific,EAS,1962,157634158384.164
East Asia & Pacific,EAS,1963,175902438691.371
East Asia & Pacific,EAS,1964,202099658345.593
East Asia & Pacific,EAS,1965,225097031930.026
East Asia & Pacific,EAS,1966,251654220084.227
East Asia & Pacific,EAS,1967,272677391514.359
East Asia & Pacific,EAS,1968,300494755214.571
East Asia & Pacific,EAS,1969,346159376816.483
East Asia & Pacific,EAS,1970,407482340310.948
East Asia & Pacific,EAS,1971,452155385439.724
East Asia & Pacific,EAS,1972,561124915613.103
East Asia & Pacific,EAS,1973,739677042363.32
East Asia & Pacific,EAS,1974,852154564637.675
East Asia & Pacific,EAS,1975,933155076408.682
East Asia & Pacific,EAS,1976,1026039624283.15
East Asia & Pacific,EAS,1977,1223069163831.1
East Asia & Pacific,EAS,1978,1542745010316.58
East Asia & Pacific,EAS,1979,1675126322202.62
East Asia & Pacific,EAS,1980,1811621650857.12
East Asia & Pacific,EAS,1981,2000329444916.93
East Asia & Pacific,EAS,1982,1959327051346.86
East Asia & Pacific,EAS,1983,2078325205696.09
East Asia & Pacific,EAS,1984,2229496400059.14
East Asia & Pacific,EAS,1985,2363703214005.83
East Asia & Pacific,EAS,1986,3081288169010.05
East Asia & Pacific,EAS,1987,3603282407781.65
East Asia & Pacific,EAS,1988,4336305608499.4
East Asia & Pacific,EAS,1989,4535368154904.11
East Asia & Pacific,EAS,1990,4746999011159.47
East Asia & Pacific,EAS,1991,5345047818273.24
East Asia & Pacific,EAS,1992,5835758398326.51
East Asia & Pacific,EAS,1993,6552477292052.35
East Asia & Pacific,EAS,1994,7313623815311.39
East Asia & Pacific,EAS,1995,8310311039754.74
East Asia & Pacific,EAS,1996,8008587857961.38
East Asia & Pacific,EAS,1997,7662988542672.2
East Asia & Pacific,EAS,1998,6863955800395.99
East Asia & Pacific,EAS,1999,7665318632852.15
East Asia & Pacific,EAS,2000,8291881372201.96
East Asia & Pacific,EAS,2001,7712927229834.08
East Asia & Pacific,EAS,2002,7837074972126.93
East Asia & Pacific,EAS,2003,8617381783014.6
East Asia & Pacific,EAS,2004,9663708744825.51
East Asia & Pacific,EAS,2005,10311337123730.3
East Asia & Pacific,EAS,2006,10939731186788.5
East Asia & Pacific,EAS,2007,12236995324293.9
East Asia & Pacific,EAS,2008,14134059989615.9
East Asia & Pacific,EAS,2009,14564521831208.3
East Asia & Pacific,EAS,2010,16938756587419.1
East Asia & Pacific,EAS,2011,19638672525945
East Asia & Pacific,EAS,2012,21019132105911.6
East Asia & Pacific,EAS,2013,21262544412410.1
East Asia & Pacific,EAS,2014,21900031790821.4
East Asia & Pacific,EAS,2015,21766948388560.2
East Asia & Pacific,EAS,2016,22480427869996.2
East Asia & Pacific (excluding high income),EAP,1960,80518696000.8927
East Asia & Pacific (excluding high income),EAP,1961,70681455168.9896
East Asia & Pacific (excluding high income),EAP,1962,64769510577.3344
East Asia & Pacific (excluding high income),EAP,1963,70136390296.0357
East Asia & Pacific (excluding high income),EAP,1964,81316003235.6796
East Asia & Pacific (excluding high income),EAP,1965,94897351255.7441
East Asia & Pacific (excluding high income),EAP,1966,103886511741.267
East Asia & Pacific (excluding high income),EAP,1967,100662752164.515
East Asia & Pacific (excluding high income),EAP,1968,101693800242.244
East Asia & Pacific (excluding high income),EAP,1969,114217932022.435
East Asia & Pacific (excluding high income),EAP,1970,127313168493.44
East Asia & Pacific (excluding high income),EAP,1971,136878723644.538
East Asia & Pacific (excluding high income),EAP,1972,155310934931.674
East Asia & Pacific (excluding high income),EAP,1973,195708821541.4
East Asia & Pacific (excluding high income),EAP,1974,221300661170.708
East Asia & Pacific (excluding high income),EAP,1975,248888152432.607
East Asia & Pacific (excluding high income),EAP,1976,253054369682.351
East Asia & Pacific (excluding high income),EAP,1977,292610334593.215
East Asia & Pacific (excluding high income),EAP,1978,283760709405.779
East Asia & Pacific (excluding high income),EAP,1979,328128012802.225
East Asia & Pacific (excluding high income),EAP,1980,379504541663.84
East Asia & Pacific (excluding high income),EAP,1981,405525611894.783
East Asia & Pacific (excluding high income),EAP,1982,425626144074.375
East Asia & Pacific (excluding high income),EAP,1983,445707127439.067
East Asia & Pacific (excluding high income),EAP,1984,483631332127.725
East Asia & Pacific (excluding high income),EAP,1985,529495949770.745
East Asia & Pacific (excluding high income),EAP,1986,527664946723.674
East Asia & Pacific (excluding high income),EAP,1987,520956352850.569
East Asia & Pacific (excluding high income),EAP,1988,577812625861.037
East Asia & Pacific (excluding high income),EAP,1989,624706266003.806
East Asia & Pacific (excluding high income),EAP,1990,669863020224.736
East Asia & Pacific (excluding high income),EAP,1991,727077354112.482
East Asia & Pacific (excluding high income),EAP,1992,814592738317.294
East Asia & Pacific (excluding high income),EAP,1993,895434641679.377
East Asia & Pacific (excluding high income),EAP,1994,1076281227424.21
East Asia & Pacific (excluding high income),EAP,1995,1327345521155.67
East Asia & Pacific (excluding high income),EAP,1996,1524284386976.58
East Asia & Pacific (excluding high income),EAP,1997,1577561090239.87
East Asia & Pacific (excluding high income),EAP,1998,1439218353454.99
East Asia & Pacific (excluding high income),EAP,1999,1585434255545.34
East Asia & Pacific (excluding high income),EAP,2000,1745767476937.47
East Asia & Pacific (excluding high income),EAP,2001,1856457750414.03
East Asia & Pacific (excluding high income),EAP,2002,2055870453833.16
East Asia & Pacific (excluding high income),EAP,2003,2327842621991.4
East Asia & Pacific (excluding high income),EAP,2004,2698133042142.66
East Asia & Pacific (excluding high income),EAP,2005,3124263676684.17
East Asia & Pacific (excluding high income),EAP,2006,3763693516582.98
East Asia & Pacific (excluding high income),EAP,2007,4758413352216.66
East Asia & Pacific (excluding high income),EAP,2008,6020919293827.75
East Asia & Pacific (excluding high income),EAP,2009,6531548165985.69
East Asia & Pacific (excluding high income),EAP,2010,7879326684925.74
East Asia & Pacific (excluding high income),EAP,2011,9630698001400.21
East Asia & Pacific (excluding high income),EAP,2012,10744168691109.2
East Asia & Pacific (excluding high income),EAP,2013,11860783587103
East Asia & Pacific (excluding high income),EAP,2014,12754057710794.4
East Asia & Pacific (excluding high income),EAP,2015,13268242311555
East Asia & Pacific (excluding high income),EAP,2016,13512435638588.8
East Asia & Pacific (IDA & IBRD countries),TEA,1960,80355307366.8786
East Asia & Pacific (IDA & IBRD countries),TEA,1961,70538028275.8111
East Asia & Pacific (IDA & IBRD countries),TEA,1962,64638080209.1765
East Asia & Pacific (IDA & IBRD countries),TEA,1963,69994069449.1479
East Asia & Pacific (IDA & IBRD countries),TEA,1964,81150996704.8732
East Asia & Pacific (IDA & IBRD countries),TEA,1965,94704785437.3277
East Asia & Pacific (IDA & IBRD countries),TEA,1966,103675705107.666
East Asia & Pacific (IDA & IBRD countries),TEA,1967,100458487187.694
East Asia & Pacific (IDA & IBRD countries),TEA,1968,101487443061.434
East Asia & Pacific (IDA & IBRD countries),TEA,1969,113986160858.47
East Asia & Pacific (IDA & IBRD countries),TEA,1970,127054824460
East Asia & Pacific (IDA & IBRD countries),TEA,1971,136600969175.171
East Asia & Pacific (IDA & IBRD countries),TEA,1972,154995777797.166
East Asia & Pacific (IDA & IBRD countries),TEA,1973,195311688967.174
East Asia & Pacific (IDA & IBRD countries),TEA,1974,220851597604.965
East Asia & Pacific (IDA & IBRD countries),TEA,1975,248383108296.674
East Asia & Pacific (IDA & IBRD countries),TEA,1976,252540871453.403
East Asia & Pacific (IDA & IBRD countries),TEA,1977,292016569353.064
East Asia & Pacific (IDA & IBRD countries),TEA,1978,283184901835.619
East Asia & Pacific (IDA & IBRD countries),TEA,1979,327462175047.067
East Asia & Pacific (IDA & IBRD countries),TEA,1980,378734450595.004
East Asia & Pacific (IDA & IBRD countries),TEA,1981,404702718839.182
East Asia & Pacific (IDA & IBRD countries),TEA,1982,424762462994.888
East Asia & Pacific (IDA & IBRD countries),TEA,1983,444802698004.171
East Asia & Pacific (IDA & IBRD countries),TEA,1984,482649946851.418
East Asia & Pacific (IDA & IBRD countries),TEA,1985,528421495957.583
East Asia & Pacific (IDA & IBRD countries),TEA,1986,526594208384.08
East Asia & Pacific (IDA & IBRD countries),TEA,1987,519899227597.668
East Asia & Pacific (IDA & IBRD countries),TEA,1988,576640127791.092
East Asia & Pacific (IDA & IBRD countries),TEA,1989,623438611303.322
East Asia & Pacific (IDA & IBRD countries),TEA,1990,668503733384.698
East Asia & Pacific (IDA & IBRD countries),TEA,1991,725602371007.169
East Asia & Pacific (IDA & IBRD countries),TEA,1992,812928625622.756
East Asia & Pacific (IDA & IBRD countries),TEA,1993,893590531272.716
East Asia & Pacific (IDA & IBRD countries),TEA,1994,1074056919211.37
East Asia & Pacific (IDA & IBRD countries),TEA,1995,1324594532297.9
East Asia & Pacific (IDA & IBRD countries),TEA,1996,1521124062054.59
East Asia & Pacific (IDA & IBRD countries),TEA,1997,1574291540475.98
East Asia & Pacific (IDA & IBRD countries),TEA,1998,1436249633913.78
East Asia & Pacific (IDA & IBRD countries),TEA,1999,1582148093794.23
East Asia & Pacific (IDA & IBRD countries),TEA,2000,1742171982504.69
East Asia & Pacific (IDA & IBRD countries),TEA,2001,1852635237278
East Asia & Pacific (IDA & IBRD countries),TEA,2002,2051623809834.21
East Asia & Pacific (IDA & IBRD countries),TEA,2003,2323064152053.05
East Asia & Pacific (IDA & IBRD countries),TEA,2004,2692683574401.69
East Asia & Pacific (IDA & IBRD countries),TEA,2005,3118033979234.63
East Asia & Pacific (IDA & IBRD countries),TEA,2006,3756261361900.34
East Asia & Pacific (IDA & IBRD countries),TEA,2007,4749074666841.02
East Asia & Pacific (IDA & IBRD countries),TEA,2008,6009148096611.83
East Asia & Pacific (IDA & IBRD countries),TEA,2009,6518684908087.94
East Asia & Pacific (IDA & IBRD countries),TEA,2010,7864008890290.72
East Asia & Pacific (IDA & IBRD countries),TEA,2011,9612081466761.09
East Asia & Pacific (IDA & IBRD countries),TEA,2012,10723388033068.1
East Asia & Pacific (IDA & IBRD countries),TEA,2013,11837903738760.8
East Asia & Pacific (IDA & IBRD countries),TEA,2014,12729502234335.3
East Asia & Pacific (IDA & IBRD countries),TEA,2015,13242748068603.7
East Asia & Pacific (IDA & IBRD countries),TEA,2016,13486492444155.4
Euro area,EMU,1960,245381907805.065
Euro area,EMU,1961,270100353874.124
Euro area,EMU,1962,299740225877.789
Euro area,EMU,1963,336261333718.505
Euro area,EMU,1964,373998584425.94
Euro area,EMU,1965,408106362093.821
Euro area,EMU,1966,445026423668.263
Euro area,EMU,1967,483426341513.884
Euro area,EMU,1968,518247421028.116
Euro area,EMU,1969,572514499522.906
Euro area,EMU,1970,641498475903.321
Euro area,EMU,1971,727089210150.568
Euro area,EMU,1972,878426291558.949
Euro area,EMU,1973,1140287836231.29
Euro area,EMU,1974,1292999458724.51
Euro area,EMU,1975,1499390975405.46
Euro area,EMU,1976,1564623413591.72
Euro area,EMU,1977,1779587264420.36
Euro area,EMU,1978,2179196915279.77
Euro area,EMU,1979,2639946745927.98
Euro area,EMU,1980,2956937624588.21
Euro area,EMU,1981,2569994236426.66
Euro area,EMU,1982,2488146477597.51
Euro area,EMU,1983,2427367234241.76
Euro area,EMU,1984,2328427539433.43
Euro area,EMU,1985,2392225442302.6
Euro area,EMU,1986,3357483171959.55
Euro area,EMU,1987,4153049181612.28
Euro area,EMU,1988,4567647574591.87
Euro area,EMU,1989,4665936358488.54
Euro area,EMU,1990,5872104783694.2
Euro area,EMU,1991,6104958669574.53
Euro area,EMU,1992,6735382955564.35
Euro area,EMU,1993,6169132265627.78
Euro area,EMU,1994,6516008654972.37
Euro area,EMU,1995,7520701639391.15
Euro area,EMU,1996,7612273118735.76
Euro area,EMU,1997,6959960583589.25
Euro area,EMU,1998,7151574322430.91
Euro area,EMU,1999,7119593958729.54
Euro area,EMU,2000,6487325474099.12
Euro area,EMU,2001,6593632936725.72
Euro area,EMU,2002,7174014039603.36
Euro area,EMU,2003,8851572342338.51
Euro area,EMU,2004,10152860200757
Euro area,EMU,2005,10536619657651.6
Euro area,EMU,2006,11186013472971.5
Euro area,EMU,2007,12879504293545.5
Euro area,EMU,2008,14118176482709.8
Euro area,EMU,2009,12908601410684.9
Euro area,EMU,2010,12645252803081.6
Euro area,EMU,2011,13623289150489.6
Euro area,EMU,2012,12639517177808.2
Euro area,EMU,2013,13190839006664
Euro area,EMU,2014,13476466492426.9
Euro area,EMU,2015,11661892507639.7
Euro area,EMU,2016,11934055071906
Europe & Central Asia,ECS,1960,432808366213.619
Europe & Central Asia,ECS,1961,460716438566.125
Europe & Central Asia,ECS,1962,503690734064.738
Europe & Central Asia,ECS,1963,555426322397.083
Europe & Central Asia,ECS,1964,615091988199.007
Europe & Central Asia,ECS,1965,669326436809.058
Europe & Central Asia,ECS,1966,727155773397.975
Europe & Central Asia,ECS,1967,782354301085.33
Europe & Central Asia,ECS,1968,815952773736.445
Europe & Central Asia,ECS,1969,895833562328.926
Europe & Central Asia,ECS,1970,1007773910663.56
Europe & Central Asia,ECS,1971,1136565636851.85
Europe & Central Asia,ECS,1972,1361955987875.99
Europe & Central Asia,ECS,1973,1729792431547.48
Europe & Central Asia,ECS,1974,1954412476388.09
Europe & Central Asia,ECS,1975,2283265896817.75
Europe & Central Asia,ECS,1976,2373201561892.56
Europe & Central Asia,ECS,1977,2689501678091
Europe & Central Asia,ECS,1978,3282691397268.31
Europe & Central Asia,ECS,1979,4016054634280.08
Europe & Central Asia,ECS,1980,4549120101079.41
Europe & Central Asia,ECS,1981,4048966722470.86
Europe & Central Asia,ECS,1982,3901660951920.75
Europe & Central Asia,ECS,1983,3784993440409.82
Europe & Central Asia,ECS,1984,3637906517266.89
Europe & Central Asia,ECS,1985,3764943790264.45
Europe & Central Asia,ECS,1986,5138626562504.11
Europe & Central Asia,ECS,1987,6350049382135.22
Europe & Central Asia,ECS,1988,7068792325499.52
Europe & Central Asia,ECS,1989,7225733324752.49
Europe & Central Asia,ECS,1990,8839404183172.32
Europe & Central Asia,ECS,1991,9119853534697.57
Europe & Central Asia,ECS,1992,9781799979487.2
Europe & Central Asia,ECS,1993,8989614212468.86
Europe & Central Asia,ECS,1994,9402275190706.82
Europe & Central Asia,ECS,1995,10845175383743.5
Europe & Central Asia,ECS,1996,11072726701921.7
Europe & Central Asia,ECS,1997,10506307834799.2
Europe & Central Asia,ECS,1998,10765939437357.8
Europe & Central Asia,ECS,1999,10643148560197.9
Europe & Central Asia,ECS,2000,10025331255412.2
Europe & Central Asia,ECS,2001,10122519397601.8
Europe & Central Asia,ECS,2002,11073970001446.5
Europe & Central Asia,ECS,2003,13488994424517.5
Europe & Central Asia,ECS,2004,15722616205763.6
Europe & Central Asia,ECS,2005,16747765816605.5
Europe & Central Asia,ECS,2006,18128083129847.2
Europe & Central Asia,ECS,2007,21178802883227.4
Europe & Central Asia,ECS,2008,23242038760382.1
Europe & Central Asia,ECS,2009,20443199631948.9
Europe & Central Asia,ECS,2010,20924691161658.7
Europe & Central Asia,ECS,2011,23182627672175.1
Europe & Central Asia,ECS,2012,22340699161445
Europe & Central Asia,ECS,2013,23349158951152.4
Europe & Central Asia,ECS,2014,23654699725965
Europe & Central Asia,ECS,2015,20364623091493.9
Europe & Central Asia,ECS,2016,20273841359271
Europe & Central Asia (excluding high income),ECA,1989,903702469910.518
Europe & Central Asia (excluding high income),ECA,1990,960438672723.365
Europe & Central Asia (excluding high income),ECA,1991,926765119090.882
Europe & Central Asia (excluding high income),ECA,1992,853278424689.082
Europe & Central Asia (excluding high income),ECA,1993,838260559332.892
Europe & Central Asia (excluding high income),ECA,1994,727687093069.508
Europe & Central Asia (excluding high income),ECA,1995,776931366529.201
Europe & Central Asia (excluding high income),ECA,1996,787851671889.755
Europe & Central Asia (excluding high income),ECA,1997,820131784781.859
Europe & Central Asia (excluding high income),ECA,1998,771871770861.064
Europe & Central Asia (excluding high income),ECA,1999,650450056519.37
Europe & Central Asia (excluding high income),ECA,2000,720049109208.474
Europe & Central Asia (excluding high income),ECA,2001,717063459780.74
Europe & Central Asia (excluding high income),ECA,2002,820431230925.233
Europe & Central Asia (excluding high income),ECA,2003,1037512319106.79
Europe & Central Asia (excluding high income),ECA,2004,1367597071745.93
Europe & Central Asia (excluding high income),ECA,2005,1726462747692.52
Europe & Central Asia (excluding high income),ECA,2006,2114323841124.1
Europe & Central Asia (excluding high income),ECA,2007,2727649759198.84
Europe & Central Asia (excluding high income),ECA,2008,3372332744074.17
Europe & Central Asia (excluding high income),ECA,2009,2655248450178.57
Europe & Central Asia (excluding high income),ECA,2010,3156255418573.9
Europe & Central Asia (excluding high income),ECA,2011,3891866999524.88
Europe & Central Asia (excluding high income),ECA,2012,4111011203800.41
Europe & Central Asia (excluding high income),ECA,2013,4369243129067.55
Europe & Central Asia (excluding high income),ECA,2014,4078845602865.82
Europe & Central Asia (excluding high income),ECA,2015,3121184116603.81
Europe & Central Asia (excluding high income),ECA,2016,2991823901020.52
Europe & Central Asia (IDA & IBRD countries),TEC,1989,960328174371.055
Europe & Central Asia (IDA & IBRD countries),TEC,1990,1020619449300.74
Europe & Central Asia (IDA & IBRD countries),TEC,1991,1007801660268.39
Europe & Central Asia (IDA & IBRD countries),TEC,1992,944312695478.917
Europe & Central Asia (IDA & IBRD countries),TEC,1993,931235788658.969
Europe & Central Asia (IDA & IBRD countries),TEC,1994,837243545767.788
Europe & Central Asia (IDA & IBRD countries),TEC,1995,918930607816.262
Europe & Central Asia (IDA & IBRD countries),TEC,1996,947704910874.441
Europe & Central Asia (IDA & IBRD countries),TEC,1997,979132756086.01
Europe & Central Asia (IDA & IBRD countries),TEC,1998,946228594056.391
Europe & Central Asia (IDA & IBRD countries),TEC,1999,820213773405.388
Europe & Central Asia (IDA & IBRD countries),TEC,2000,891934707791.111
Europe & Central Asia (IDA & IBRD countries),TEC,2001,907584723123.762
Europe & Central Asia (IDA & IBRD countries),TEC,2002,1019111868180.13
Europe & Central Asia (IDA & IBRD countries),TEC,2003,1255030961431.3
Europe & Central Asia (IDA & IBRD countries),TEC,2004,1622699324589.32
Europe & Central Asia (IDA & IBRD countries),TEC,2005,2032597383286.26
Europe & Central Asia (IDA & IBRD countries),TEC,2006,2459150271422.24
Europe & Central Asia (IDA & IBRD countries),TEC,2007,3156899406793.45
Europe & Central Asia (IDA & IBRD countries),TEC,2008,3906148533547.85
Europe & Central Asia (IDA & IBRD countries),TEC,2009,3095595026136.47
Europe & Central Asia (IDA & IBRD countries),TEC,2010,3635513302315.66
Europe & Central Asia (IDA & IBRD countries),TEC,2011,4420592112570.7
Europe & Central Asia (IDA & IBRD countries),TEC,2012,4611295207484.79
Europe & Central Asia (IDA & IBRD countries),TEC,2013,4893444280674.74
Europe & Central Asia (IDA & IBRD countries),TEC,2014,4623921511711.82
Europe & Central Asia (IDA & IBRD countries),TEC,2015,3598463764358.51
Europe & Central Asia (IDA & IBRD countries),TEC,2016,3463188309734.48
European Union,EUU,1960,358941480685.342
European Union,EUU,1961,390791519256.294
European Union,EUU,1962,426910351684.9
European Union,EUU,1963,470299472386.586
European Union,EUU,1964,521200319101.867
European Union,EUU,1965,567593387090.375
European Union,EUU,1966,615287019323.785
European Union,EUU,1967,661170320899.702
European Union,EUU,1968,687217213519.1
European Union,EUU,1969,754800249691.045
European Union,EUU,1970,855292146036.516
European Union,EUU,1971,967486236381.365
European Union,EUU,1972,1158401562188.61
European Union,EUU,1973,1470832859740.72
European Union,EUU,1974,1653028067253.59
European Union,EUU,1975,1927117026841.85
European Union,EUU,1976,1995883364685.02
European Union,EUU,1977,2260221868415.27
European Union,EUU,1978,2769905163479.49
European Union,EUU,1979,3382851307190.78
European Union,EUU,1980,3861239352728.53
European Union,EUU,1981,3416534450611.25
European Union,EUU,1982,3288164387534.7
European Union,EUU,1983,3187220429927.19
European Union,EUU,1984,3060219815449.45
European Union,EUU,1985,3162767439491.53
European Union,EUU,1986,4337015473173.89
European Union,EUU,1987,5366348328002.87
European Union,EUU,1988,5985919929295.46
European Union,EUU,1989,6111982965832.69
European Union,EUU,1990,7579123917337.64
European Union,EUU,1991,7865713057341.23
European Union,EUU,1992,8571123408971.34
European Union,EUU,1993,7815484531819.77
European Union,EUU,1994,8299163343409.4
European Union,EUU,1995,9626424133285.32
European Union,EUU,1996,9841349845359.83
European Union,EUU,1997,9289515973951.65
European Union,EUU,1998,9605566115360.42
European Union,EUU,1999,9590851414393.62
European Union,EUU,2000,8912444181839.19
European Union,EUU,2001,9009859801008.85
European Union,EUU,2002,9822705393482.28
European Union,EUU,2003,11957243598418.9
European Union,EUU,2004,13806710766586
European Union,EUU,2005,14441217356828.2
European Union,EUU,2006,15405419702532.5
European Union,EUU,2007,17795826802969.5
European Union,EUU,2008,19136672544394.8
European Union,EUU,2009,17101456870607.7
European Union,EUU,2010,16992731157166.1
European Union,EUU,2011,18352575953426.8
European Union,EUU,2012,17290201940776.9
European Union,EUU,2013,18026881017254.8
European Union,EUU,2014,18632423873526.3
European Union,EUU,2015,16410700117941.6
European Union,EUU,2016,16487344364513.9
Fragile and conflict affected situations,FCS,2000,216611804087.892
Fragile and conflict affected situations,FCS,2001,199204980648.686
Fragile and conflict affected situations,FCS,2002,194031873673.451
Fragile and conflict affected situations,FCS,2003,220476383127.864
Fragile and conflict affected situations,FCS,2004,254384379904.583
Fragile and conflict affected situations,FCS,2005,308822100936.666
Fragile and conflict affected situations,FCS,2006,364922330440.8
Fragile and conflict affected situations,FCS,2007,448717231807.979
Fragile and conflict affected situations,FCS,2008,579390636982.778
Fragile and conflict affected situations,FCS,2009,539487601072.752
Fragile and conflict affected situations,FCS,2010,643371393579.443
Fragile and conflict affected situations,FCS,2011,700475870799.069
Fragile and conflict affected situations,FCS,2012,756982984497.055
Fragile and conflict affected situations,FCS,2013,810325310133.497
Fragile and conflict affected situations,FCS,2014,852105715991.816
Fragile and conflict affected situations,FCS,2015,770043726631.159
Fragile and conflict affected situations,FCS,2016,744250583417.645
Heavily indebted poor countries (HIPC),HPC,1960,17473803358.3576
Heavily indebted poor countries (HIPC),HPC,1961,17924863806.0248
Heavily indebted poor countries (HIPC),HPC,1962,19538438424.6195
Heavily indebted poor countries (HIPC),HPC,1963,23684971462.7979
Heavily indebted poor countries (HIPC),HPC,1964,20979456378.9673
Heavily indebted poor countries (HIPC),HPC,1965,24348171156.5056
Heavily indebted poor countries (HIPC),HPC,1966,26567528898.4797
Heavily indebted poor countries (HIPC),HPC,1967,25931280079.0429
Heavily indebted poor countries (HIPC),HPC,1968,27114287369.6073
Heavily indebted poor countries (HIPC),HPC,1969,30297392080.4224
Heavily indebted poor countries (HIPC),HPC,1970,31764371339.4816
Heavily indebted poor countries (HIPC),HPC,1971,34259906250.4647
Heavily indebted poor countries (HIPC),HPC,1972,37115833946.3264
Heavily indebted poor countries (HIPC),HPC,1973,44704748982.8857
Heavily indebted poor countries (HIPC),HPC,1974,54845280151.1207
Heavily indebted poor countries (HIPC),HPC,1975,62227654281.4084
Heavily indebted poor countries (HIPC),HPC,1976,65977606587.174
Heavily indebted poor countries (HIPC),HPC,1977,77971412145.8688
Heavily indebted poor countries (HIPC),HPC,1978,89080486979.1768
Heavily indebted poor countries (HIPC),HPC,1979,100816612471.748
Heavily indebted poor countries (HIPC),HPC,1980,105070816410.828
Heavily indebted poor countries (HIPC),HPC,1981,104722428738.279
Heavily indebted poor countries (HIPC),HPC,1982,104470999714.143
Heavily indebted poor countries (HIPC),HPC,1983,97967495415.5474
Heavily indebted poor countries (HIPC),HPC,1984,97376234702.4767
Heavily indebted poor countries (HIPC),HPC,1985,102805186198.818
Heavily indebted poor countries (HIPC),HPC,1986,118063300657.23
Heavily indebted poor countries (HIPC),HPC,1987,129279648797.364
Heavily indebted poor countries (HIPC),HPC,1988,130138553201.136
Heavily indebted poor countries (HIPC),HPC,1989,126907408967.556
Heavily indebted poor countries (HIPC),HPC,1990,129332509496.38
Heavily indebted poor countries (HIPC),HPC,1991,133034561577.745
Heavily indebted poor countries (HIPC),HPC,1992,121554021679.448
Heavily indebted poor countries (HIPC),HPC,1993,125716795445.415
Heavily indebted poor countries (HIPC),HPC,1994,111543057646.82
Heavily indebted poor countries (HIPC),HPC,1995,126833608615.718
Heavily indebted poor countries (HIPC),HPC,1996,132655593112.174
Heavily indebted poor countries (HIPC),HPC,1997,139378996056.165
Heavily indebted poor countries (HIPC),HPC,1998,143540877746.382
Heavily indebted poor countries (HIPC),HPC,1999,143471305439.965
Heavily indebted poor countries (HIPC),HPC,2000,155563887045.671
Heavily indebted poor countries (HIPC),HPC,2001,147865835777.795
Heavily indebted poor countries (HIPC),HPC,2002,160612026755.468
Heavily indebted poor countries (HIPC),HPC,2003,182909315345.596
Heavily indebted poor countries (HIPC),HPC,2004,210715003171.706
Heavily indebted poor countries (HIPC),HPC,2005,243039696796.659
Heavily indebted poor countries (HIPC),HPC,2006,291439445833.395
Heavily indebted poor countries (HIPC),HPC,2007,347724979758.612
Heavily indebted poor countries (HIPC),HPC,2008,419658073051.163
Heavily indebted poor countries (HIPC),HPC,2009,423821062294.997
Heavily indebted poor countries (HIPC),HPC,2010,467851910947.034
Heavily indebted poor countries (HIPC),HPC,2011,522235870418.369
Heavily indebted poor countries (HIPC),HPC,2012,562429100212.344
Heavily indebted poor countries (HIPC),HPC,2013,610041631803.768
Heavily indebted poor countries (HIPC),HPC,2014,647799966373.646
Heavily indebted poor countries (HIPC),HPC,2015,638732542973.423
Heavily indebted poor countries (HIPC),HPC,2016,648289348137.032
High income,HIC,1960,1060258072791.74
High income,HIC,1961,1121996285055.52
High income,HIC,1962,1211792827212.7
High income,HIC,1963,1304620497418.63
High income,HIC,1964,1424603081155.61
High income,HIC,1965,1546710635349.61
High income,HIC,1966,1696368738245.88
High income,HIC,1967,1819351699376.25
High income,HIC,1968,1971291391708.43
High income,HIC,1969,2163827812132.42
High income,HIC,1970,2380595949289.87
High income,HIC,1971,2641741790124.4
High income,HIC,1972,3065239822184.77
High income,HIC,1973,3708269759617.75
High income,HIC,1974,4184574976576.47
High income,HIC,1975,4666187491775.43
High income,HIC,1976,5082771482780.97
High income,HIC,1977,5755311493073.73
High income,HIC,1978,6891607724618.11
High income,HIC,1979,7969743516772.65
High income,HIC,1980,8901501975008.19
High income,HIC,1981,9039466240271.62
High income,HIC,1982,8953452764925.84
High income,HIC,1983,9243982005079.97
High income,HIC,1984,9641528010689.37
High income,HIC,1985,10136233531381
High income,HIC,1986,12302761994061.6
High income,HIC,1987,14248999154625.7
High income,HIC,1988,16050083959668.3
High income,HIC,1989,16811861166559.1
High income,HIC,1990,18904669325644.7
High income,HIC,1991,19993173229920.4
High income,HIC,1992,21511275511532
High income,HIC,1993,21708016177525.8
High income,HIC,1994,23267698841306.7
High income,HIC,1995,25839440231944.2
High income,HIC,1996,26070328906133
High income,HIC,1997,25641643763544.4
High income,HIC,1998,25726539283381
High income,HIC,1999,27026530357967
High income,HIC,2000,27585577029586.3
High income,HIC,2001,27317812538281.7
High income,HIC,2002,28473503000743.8
High income,HIC,2003,31923065054386.2
High income,HIC,2004,35532173604878.7
High income,HIC,2005,37574855319061.9
High income,HIC,2006,39654700828655.5
High income,HIC,2007,43338243118132.2
High income,HIC,2008,46030397500591
High income,HIC,2009,43140742229258.8
High income,HIC,2010,45206818210523.2
High income,HIC,2011,48779671089397.1
High income,HIC,2012,48814556726132.5
High income,HIC,2013,49346301570030.6
High income,HIC,2014,50362403986688.1
High income,HIC,2015,47577512619183.3
High income,HIC,2016,48557463061833.1
IBRD only,IBD,1960,294957715625.798
IBRD only,IBD,1961,281784055643.415
IBRD only,IBD,1962,294099146764.465
IBRD only,IBD,1963,313571783512.354
IBRD only,IBD,1964,355118144215.683
IBRD only,IBD,1965,390096481947.677
IBRD only,IBD,1966,402242586408.804
IBRD only,IBD,1967,413245761438.504
IBRD only,IBD,1968,436906908761.676
IBRD only,IBD,1969,488450438382.184
IBRD only,IBD,1970,529816131068.337
IBRD only,IBD,1971,579022847050.05
IBRD only,IBD,1972,651685468689.452
IBRD only,IBD,1973,838687407232.942
IBRD only,IBD,1974,1058778466899.08
IBRD only,IBD,1975,1144587686605.96
IBRD only,IBD,1976,1248656052285.51
IBRD only,IBD,1977,1416509063968.81
IBRD only,IBD,1978,1528083460017.87
IBRD only,IBD,1979,1828890871805.43
IBRD only,IBD,1980,2144525741602.09
IBRD only,IBD,1981,2326989982246.21
IBRD only,IBD,1982,2308664653596.24
IBRD only,IBD,1983,2277496930910.69
IBRD only,IBD,1984,2319367661959.1
IBRD only,IBD,1985,2445112446662.71
IBRD only,IBD,1986,2558329186780.92
IBRD only,IBD,1987,2620900784641.03
IBRD only,IBD,1988,2850097126288.85
IBRD only,IBD,1989,3051387008971.52
IBRD only,IBD,1990,3450586169233.02
IBRD only,IBD,1991,3718939789573.02
IBRD only,IBD,1992,3704535955509.18
IBRD only,IBD,1993,3976073581552.04
IBRD only,IBD,1994,4355401723809.41
IBRD only,IBD,1995,4890357861496.17
IBRD only,IBD,1996,5337081837421.85
IBRD only,IBD,1997,5647276515792.42
IBRD only,IBD,1998,5479894417383.33
IBRD only,IBD,1999,5325787480159.51
IBRD only,IBD,2000,5787180750891.22
IBRD only,IBD,2001,5864138427158.66
IBRD only,IBD,2002,5957570111975.94
IBRD only,IBD,2003,6728237860877.42
IBRD only,IBD,2004,8009679581710.35
IBRD only,IBD,2005,9574863191621.96
IBRD only,IBD,2006,11352987184252.7
IBRD only,IBD,2007,14128955914663.9
IBRD only,IBD,2008,16969030260876.9
IBRD only,IBD,2009,16477638785512.6
IBRD only,IBD,2010,19973945540448.7
IBRD only,IBD,2011,23619352272048.5
IBRD only,IBD,2012,25054597172918.9
IBRD only,IBD,2013,26510181016987.1
IBRD only,IBD,2014,27396611247619.6
IBRD only,IBD,2015,25854305463828.1
IBRD only,IBD,2016,25981476556760.5
IDA & IBRD total,IBT,1960,332420099879.097
IDA & IBRD total,IBT,1961,321960211021.18
IDA & IBRD total,IBT,1962,337639098485.335
IDA & IBRD total,IBT,1963,362701026033.953
IDA & IBRD total,IBT,1964,402888912470.62
IDA & IBRD total,IBT,1965,444077005175.987
IDA & IBRD total,IBT,1966,460869446341.786
IDA & IBRD total,IBT,1967,472420666758.729
IDA & IBRD total,IBT,1968,499278337173.877
IDA & IBRD total,IBT,1969,558933567077.315
IDA & IBRD total,IBT,1970,611855530903.874
IDA & IBRD total,IBT,1971,661298625984.077
IDA & IBRD total,IBT,1972,737279697380.946
IDA & IBRD total,IBT,1973,936640748618.375
IDA & IBRD total,IBT,1974,1191688150825.68
IDA & IBRD total,IBT,1975,1303949620697.17
IDA & IBRD total,IBT,1976,1414314819623.72
IDA & IBRD total,IBT,1977,1597017022159.75
IDA & IBRD total,IBT,1978,1732099297291.98
IDA & IBRD total,IBT,1979,2067282168911.5
IDA & IBRD total,IBT,1980,2425094762726.23
IDA & IBRD total,IBT,1981,2614351458203.56
IDA & IBRD total,IBT,1982,2586535902781.4
IDA & IBRD total,IBT,1983,2525470175591.81
IDA & IBRD total,IBT,1984,2559559983318.84
IDA & IBRD total,IBT,1985,2694824275386.56
IDA & IBRD total,IBT,1986,2815682890326.31
IDA & IBRD total,IBT,1987,2898815751592.97
IDA & IBRD total,IBT,1988,3138724053348.55
IDA & IBRD total,IBT,1989,3342030430117.54
IDA & IBRD total,IBT,1990,3760263071705.36
IDA & IBRD total,IBT,1991,4035816997833.87
IDA & IBRD total,IBT,1992,4012284192507.96
IDA & IBRD total,IBT,1993,4275988290608.16
IDA & IBRD total,IBT,1994,4643315483566.54
IDA & IBRD total,IBT,1995,5223225373502.85
IDA & IBRD total,IBT,1996,5703932322881.56
IDA & IBRD total,IBT,1997,6026677999942.79
IDA & IBRD total,IBT,1998,5857257663149.43
IDA & IBRD total,IBT,1999,5711746768836.54
IDA & IBRD total,IBT,2000,6213004939197.82
IDA & IBRD total,IBT,2001,6279095049696.93
IDA & IBRD total,IBT,2002,6402159677650.68
IDA & IBRD total,IBT,2003,7231716537197.51
IDA & IBRD total,IBT,2004,8595676908613.7
IDA & IBRD total,IBT,2005,10252563289337.4
IDA & IBRD total,IBT,2006,12171329219107.2
IDA & IBRD total,IBT,2007,15085802941075.8
IDA & IBRD total,IBT,2008,18119451371651.3
IDA & IBRD total,IBT,2009,17607503432796.2
IDA & IBRD total,IBT,2010,21425535721688.5
IDA & IBRD total,IBT,2011,25267940554152.8
IDA & IBRD total,IBT,2012,26831458123531.8
IDA & IBRD total,IBT,2013,28440718308132.7
IDA & IBRD total,IBT,2014,29482467782135.6
IDA & IBRD total,IBT,2015,27876686929740.8
IDA & IBRD total,IBT,2016,27972819139754.5
IDA blend,IDB,1960,12525680950.9576
IDA blend,IDB,1961,13386351816.5945
IDA blend,IDB,1962,14307816104.3043
IDA blend,IDB,1963,15133348219.3266
IDA blend,IDB,1964,16543899359.3215
IDA blend,IDB,1965,18004962168.3536
IDA blend,IDB,1966,19544706292.4751
IDA blend,IDB,1967,19667042556.1037
IDA blend,IDB,1968,20906822494.9082
IDA blend,IDB,1969,23857220125.2404
IDA blend,IDB,1970,32837073290.36
IDA blend,IDB,1971,30359420847.3086
IDA blend,IDB,1972,33929717613.8687
IDA blend,IDB,1973,36066821279.9032
IDA blend,IDB,1974,52377237128.2013
IDA blend,IDB,1975,60240314536.3242
IDA blend,IDB,1976,73250340512.4385
IDA blend,IDB,1977,76778825024.8365
IDA blend,IDB,1978,83172550736.8087
IDA blend,IDB,1979,102343390447.38
IDA blend,IDB,1980,131644491209.18
IDA blend,IDB,1981,135584627037.35
IDA blend,IDB,1982,127683940852.885
IDA blend,IDB,1983,106265348540.911
IDA blend,IDB,1984,99705701419.0621
IDA blend,IDB,1985,99635251825.2704
IDA blend,IDB,1986,96824536112.5831
IDA blend,IDB,1987,107028115535.764
IDA blend,IDB,1988,114656536466.96
IDA blend,IDB,1989,117218646278.359
IDA blend,IDB,1990,124491404586.038
IDA blend,IDB,1991,128062928784.71
IDA blend,IDB,1992,129439244131.401
IDA blend,IDB,1993,119431418788.406
IDA blend,IDB,1994,119278991736.472
IDA blend,IDB,1995,140582479963.877
IDA blend,IDB,1996,156517602049.483
IDA blend,IDB,1997,158318501147.493
IDA blend,IDB,1998,151436686944.96
IDA blend,IDB,1999,157758167977.6
IDA blend,IDB,2000,175670535724.267
IDA blend,IDB,2001,169637750175.563
IDA blend,IDB,2002,184390856565.303
IDA blend,IDB,2003,210309399964.325
IDA blend,IDB,2004,254107331006.866
IDA blend,IDB,2005,298966157726.575
IDA blend,IDB,2006,377892170694.759
IDA blend,IDB,2007,432494229337.87
IDA blend,IDB,2008,515331066665.508
IDA blend,IDB,2009,479916707070.375
IDA blend,IDB,2010,707233865359.817
IDA blend,IDB,2011,810782537391.527
IDA blend,IDB,2012,891826340277.914
IDA blend,IDB,2013,969503885737.184
IDA blend,IDB,2014,1052620067829.89
IDA blend,IDB,2015,984508326729.442
IDA blend,IDB,2016,923606013413.981
IDA only,IDX,1980,149452950457.482
IDA only,IDX,1981,152280469182.83
IDA only,IDX,1982,151393150593.556
IDA only,IDX,1983,144719716101.73
IDA only,IDX,1984,144300309666.587
IDA only,IDX,1985,154705670371.884
IDA only,IDX,1986,166179914408.842
IDA only,IDX,1987,176101376349.727
IDA only,IDX,1988,178968363238.156
IDA only,IDX,1989,178613242288.329
IDA only,IDX,1990,187635958013.73
IDA only,IDX,1991,190582893944.701
IDA only,IDX,1992,179339325200.688
IDA only,IDX,1993,181205499863.139
IDA only,IDX,1994,167439883605.373
IDA only,IDX,1995,191139487030.569
IDA only,IDX,1996,209101340746.376
IDA only,IDX,1997,219709845492.706
IDA only,IDX,1998,225492475199.991
IDA only,IDX,1999,228384752868.434
IDA only,IDX,2000,250496797796.716
IDA only,IDX,2001,245457279053.403
IDA only,IDX,2002,260506321914.329
IDA only,IDX,2003,293490957922.838
IDA only,IDX,2004,331890668943.604
IDA only,IDX,2005,378279875004.078
IDA only,IDX,2006,439667449381.062
IDA only,IDX,2007,522810471183.771
IDA only,IDX,2008,633846418352.25
IDA only,IDX,2009,652748933565.031
IDA only,IDX,2010,742077497033.099
IDA only,IDX,2011,831576507631.743
IDA only,IDX,2012,877952610254.43
IDA only,IDX,2013,955563577640.96
IDA only,IDX,2014,1030596428731.83
IDA only,IDX,2015,1039549171419.7
IDA only,IDX,2016,1072786488210.4
IDA total,IDA,1960,38552843708.9354
IDA total,IDA,1961,40693283773.58
IDA total,IDA,1962,43887390094.0645
IDA total,IDA,1963,49429967763.5083
IDA total,IDA,1964,48314009338.6137
IDA total,IDA,1965,54527198662.1703
IDA total,IDA,1966,59160876212.7685
IDA total,IDA,1967,59734974396.4725
IDA total,IDA,1968,62963565810.293
IDA total,IDA,1969,71150741264.5023
IDA total,IDA,1970,82807754900.386
IDA total,IDA,1971,83066378876.2017
IDA total,IDA,1972,86442205439.2379
IDA total,IDA,1973,98971784199.4293
IDA total,IDA,1974,134250629861.833
IDA total,IDA,1975,160984432183.309
IDA total,IDA,1976,167340358213.323
IDA total,IDA,1977,182330728312.277
IDA total,IDA,1978,206076745410.445
IDA total,IDA,1979,240799007044.617
IDA total,IDA,1980,283402210725.02
IDA total,IDA,1981,290342908727.912
IDA total,IDA,1982,280959587891.783
IDA total,IDA,1983,251503725681.482
IDA total,IDA,1984,244016052826.94
IDA total,IDA,1985,253831737187.656
IDA total,IDA,1986,261726969533.395
IDA total,IDA,1987,282047953084.372
IDA total,IDA,1988,292878032914.381
IDA total,IDA,1989,295192606453.256
IDA total,IDA,1990,311501481838.973
IDA total,IDA,1991,318111129146.48
IDA total,IDA,1992,308723210809.946
IDA total,IDA,1993,300031302947.81
IDA total,IDA,1994,286507832410.8
IDA total,IDA,1995,331653789329.34
IDA total,IDA,1996,365670737508.173
IDA total,IDA,1997,377797938000.412
IDA total,IDA,1998,376180134271.141
IDA total,IDA,1999,385587434091.455
IDA total,IDA,2000,425680459229.063
IDA total,IDA,2001,414566558489.182
IDA total,IDA,2002,444398292761.095
IDA total,IDA,2003,503274924958.026
IDA total,IDA,2004,585635687953.13
IDA total,IDA,2005,676966114515.745
IDA total,IDA,2006,817667343182.622
IDA total,IDA,2007,955192703165.729
IDA total,IDA,2008,1148503307752.05
IDA total,IDA,2009,1128757219790.24
IDA total,IDA,2010,1455098670264.63
IDA total,IDA,2011,1649712795941.65
IDA total,IDA,2012,1779309786690.56
IDA total,IDA,2013,1935383621726.91
IDA total,IDA,2014,2094666160482.5
IDA total,IDA,2015,2032030985340.31
IDA total,IDA,2016,1999807711387.41
Late-demographic dividend,LTE,1960,170979365242.809
Late-demographic dividend,LTE,1961,157896674355.198
Late-demographic dividend,LTE,1962,165672342325.31
Late-demographic dividend,LTE,1963,179541877513.652
Late-demographic dividend,LTE,1964,198101527203.29
Late-demographic dividend,LTE,1965,220983241522.617
Late-demographic dividend,LTE,1966,245370182543.278
Late-demographic dividend,LTE,1967,247714846991.242
Late-demographic dividend,LTE,1968,253063153518.702
Late-demographic dividend,LTE,1969,282833389878.531
Late-demographic dividend,LTE,1970,321365983627.756
Late-demographic dividend,LTE,1971,357843090756.29
Late-demographic dividend,LTE,1972,410663946539.173
Late-demographic dividend,LTE,1973,521689118742.274
Late-demographic dividend,LTE,1974,614359539540.818
Late-demographic dividend,LTE,1975,675064297226.859
Late-demographic dividend,LTE,1976,736554966601.838
Late-demographic dividend,LTE,1977,854922183289.794
Late-demographic dividend,LTE,1978,890801447493.197
Late-demographic dividend,LTE,1979,1064378345450.16
Late-demographic dividend,LTE,1980,1206588180549.08
Late-demographic dividend,LTE,1981,1279079526271.61
Late-demographic dividend,LTE,1982,1308693372660.14
Late-demographic dividend,LTE,1983,1210830059076.8
Late-demographic dividend,LTE,1984,1274950873382.07
Late-demographic dividend,LTE,1985,1362599557653.42
Late-demographic dividend,LTE,1986,1449309735032.07
Late-demographic dividend,LTE,1987,1527791941343.19
Late-demographic dividend,LTE,1988,1682832142063.89
Late-demographic dividend,LTE,1989,1907371231981.91
Late-demographic dividend,LTE,1990,2027238777745.44
Late-demographic dividend,LTE,1991,2230289305088.13
Late-demographic dividend,LTE,1992,2079918505675.61
Late-demographic dividend,LTE,1993,2155933467967.38
Late-demographic dividend,LTE,1994,2468851478670.16
Late-demographic dividend,LTE,1995,3032822828435.27
Late-demographic dividend,LTE,1996,3325689514009.88
Late-demographic dividend,LTE,1997,3480282448432.12
Late-demographic dividend,LTE,1998,3351287871402.87
Late-demographic dividend,LTE,1999,3096016890918.91
Late-demographic dividend,LTE,2000,3400746698943.93
Late-demographic dividend,LTE,2001,3515173798011.25
Late-demographic dividend,LTE,2002,3723537029342.66
Late-demographic dividend,LTE,2003,4246057259568.52
Late-demographic dividend,LTE,2004,5103484222816.06
Late-demographic dividend,LTE,2005,6161727739418.01
Late-demographic dividend,LTE,2006,7436775397223.2
Late-demographic dividend,LTE,2007,9366207813701.86
Late-demographic dividend,LTE,2008,11645245415729.3
Late-demographic dividend,LTE,2009,11258203905362.3
Late-demographic dividend,LTE,2010,13513745408334.7
Late-demographic dividend,LTE,2011,16480045678794.9
Late-demographic dividend,LTE,2012,17631664734747.7
Late-demographic dividend,LTE,2013,19014316277878.7
Late-demographic dividend,LTE,2014,19703102026309.7
Late-demographic dividend,LTE,2015,18456544742036.6
Late-demographic dividend,LTE,2016,18455074977717.5
Latin America & Caribbean,LCN,1960,81231814846.363
Latin America & Caribbean,LCN,1961,86287335349.4088
Latin America & Caribbean,LCN,1962,99366717908.2988
Latin America & Caribbean,LCN,1963,99955845906.0715
Latin America & Caribbean,LCN,1964,111011134837.996
Latin America & Caribbean,LCN,1965,119371791469.707
Latin America & Caribbean,LCN,1966,131018820033.415
Latin America & Caribbean,LCN,1967,134187210192.191
Latin America & Caribbean,LCN,1968,144510148767.745
Latin America & Caribbean,LCN,1969,161958447586.971
Latin America & Caribbean,LCN,1970,176071905100.07
Latin America & Caribbean,LCN,1971,196968821795.516
Latin America & Caribbean,LCN,1972,221446080247.827
Latin America & Caribbean,LCN,1973,289954046146.875
Latin America & Caribbean,LCN,1974,376428081259.377
Latin America & Caribbean,LCN,1975,394878139738.537
Latin America & Caribbean,LCN,1976,439009649467.299
Latin America & Caribbean,LCN,1977,483105144772.74
Latin America & Caribbean,LCN,1978,548082288899.465
Latin America & Caribbean,LCN,1979,653361957732.235
Latin America & Caribbean,LCN,1980,774610663634.314
Latin America & Caribbean,LCN,1981,892197077887.729
Latin America & Caribbean,LCN,1982,834249556962.449
Latin America & Caribbean,LCN,1983,740171057904.183
Latin America & Caribbean,LCN,1984,729654325488.334
Latin America & Caribbean,LCN,1985,751412828440.244
Latin America & Caribbean,LCN,1986,764534086642.951
Latin America & Caribbean,LCN,1987,803851944552.642
Latin America & Caribbean,LCN,1988,919123365001.321
Latin America & Caribbean,LCN,1989,1006401717319.53
Latin America & Caribbean,LCN,1990,1170503151627.96
Latin America & Caribbean,LCN,1991,1440164640565.46
Latin America & Caribbean,LCN,1992,1358402572233.26
Latin America & Caribbean,LCN,1993,1564941586767.48
Latin America & Caribbean,LCN,1994,1797150604612.08
Latin America & Caribbean,LCN,1995,1916099952742.19
Latin America & Caribbean,LCN,1996,2060739358051.35
Latin America & Caribbean,LCN,1997,2255377958184.28
Latin America & Caribbean,LCN,1998,2271734570154.72
Latin America & Caribbean,LCN,1999,2050793815133.05
Latin America & Caribbean,LCN,2000,2262091810679.88
Latin America & Caribbean,LCN,2001,2204817296105.27
Latin America & Caribbean,LCN,2002,1976797807992.51
Latin America & Caribbean,LCN,2003,2035302568313.9
Latin America & Caribbean,LCN,2004,2350657774176.39
Latin America & Caribbean,LCN,2005,2845509423691.62
Latin America & Caribbean,LCN,2006,3337244559997.56
Latin America & Caribbean,LCN,2007,3936347648225.09
Latin America & Caribbean,LCN,2008,4576034696193.34
Latin America & Caribbean,LCN,2009,4302163169714.6
Latin America & Caribbean,LCN,2010,5334533033072.82
Latin America & Caribbean,LCN,2011,6064277798886.03
Latin America & Caribbean,LCN,2012,6121206635064.58
Latin America & Caribbean,LCN,2013,6272989482508.83
Latin America & Caribbean,LCN,2014,6391549877362.08
Latin America & Caribbean,LCN,2015,5459206256454.35
Latin America & Caribbean,LCN,2016,5299865625774.02
Latin America & Caribbean (excluding high income),LAC,1960,73257271838.3015
Latin America & Caribbean (excluding high income),LAC,1961,76976526265.3716
Latin America & Caribbean (excluding high income),LAC,1962,88753234541.7555
Latin America & Caribbean (excluding high income),LAC,1963,88910024329.5201
Latin America & Caribbean (excluding high income),LAC,1964,98849108076.6562
Latin America & Caribbean (excluding high income),LAC,1965,106853155864.806
Latin America & Caribbean (excluding high income),LAC,1966,117136947969.298
Latin America & Caribbean (excluding high income),LAC,1967,120080359870.468
Latin America & Caribbean (excluding high income),LAC,1968,129699733259.399
Latin America & Caribbean (excluding high income),LAC,1969,144755178875.731
Latin America & Caribbean (excluding high income),LAC,1970,157275868995.927
Latin America & Caribbean (excluding high income),LAC,1971,174869994567.771
Latin America & Caribbean (excluding high income),LAC,1972,197935255376.821
Latin America & Caribbean (excluding high income),LAC,1973,258306734902.943
Latin America & Caribbean (excluding high income),LAC,1974,343441856215.444
Latin America & Caribbean (excluding high income),LAC,1975,370095266534.958
Latin America & Caribbean (excluding high income),LAC,1976,410244151113.2
Latin America & Caribbean (excluding high income),LAC,1977,448352062372.945
Latin America & Caribbean (excluding high income),LAC,1978,508329063096.249
Latin America & Caribbean (excluding high income),LAC,1979,601944719169.461
Latin America & Caribbean (excluding high income),LAC,1980,708704884814.461
Latin America & Caribbean (excluding high income),LAC,1981,816873638188.249
Latin America & Caribbean (excluding high income),LAC,1982,768136284782.835
Latin America & Caribbean (excluding high income),LAC,1983,683173418380.995
Latin America & Caribbean (excluding high income),LAC,1984,671392237378.637
Latin America & Caribbean (excluding high income),LAC,1985,694019952730.768
Latin America & Caribbean (excluding high income),LAC,1986,705374201105.676
Latin America & Caribbean (excluding high income),LAC,1987,737306149636.792
Latin America & Caribbean (excluding high income),LAC,1988,845147525282.733
Latin America & Caribbean (excluding high income),LAC,1989,925574603351.671
Latin America & Caribbean (excluding high income),LAC,1990,1081353158729.94
Latin America & Caribbean (excluding high income),LAC,1991,1341594021698.3
Latin America & Caribbean (excluding high income),LAC,1992,1247729796123.51
Latin America & Caribbean (excluding high income),LAC,1993,1446291182385.59
Latin America & Caribbean (excluding high income),LAC,1994,1663902703405.24
Latin America & Caribbean (excluding high income),LAC,1995,1760538940820.6
Latin America & Caribbean (excluding high income),LAC,1996,1895254878114.76
Latin America & Caribbean (excluding high income),LAC,1997,2074269012890.99
Latin America & Caribbean (excluding high income),LAC,1998,2085413655018.9
Latin America & Caribbean (excluding high income),LAC,1999,1867635348454.48
Latin America & Caribbean (excluding high income),LAC,2000,2070772006620.39
Latin America & Caribbean (excluding high income),LAC,2001,2013631181344.99
Latin America & Caribbean (excluding high income),LAC,2002,1791362291806.72
Latin America & Caribbean (excluding high income),LAC,2003,1839436251262.6
Latin America & Caribbean (excluding high income),LAC,2004,2121459944550.01
Latin America & Caribbean (excluding high income),LAC,2005,2579728859496.06
Latin America & Caribbean (excluding high income),LAC,2006,3029713038041.48
Latin America & Caribbean (excluding high income),LAC,2007,3598139206333.45
Latin America & Caribbean (excluding high income),LAC,2008,4213483414952.47
Latin America & Caribbean (excluding high income),LAC,2009,3953155755587.8
Latin America & Caribbean (excluding high income),LAC,2010,4923605261317.64
Latin America & Caribbean (excluding high income),LAC,2011,5605037810076.2
Latin America & Caribbean (excluding high income),LAC,2012,5639934948104.64
Latin America & Caribbean (excluding high income),LAC,2013,5771411525042.99
Latin America & Caribbean (excluding high income),LAC,2014,5905518272856.91
Latin America & Caribbean (excluding high income),LAC,2015,5012592560057.5
Latin America & Caribbean (excluding high income),LAC,2016,4853042525000.34
Latin America & the Caribbean (IDA & IBRD countries),TLA,1960,76340051019.9824
Latin America & the Caribbean (IDA & IBRD countries),TLA,1961,80983672521.946
Latin America & the Caribbean (IDA & IBRD countries),TLA,1962,93332172395.1245
Latin America & the Caribbean (IDA & IBRD countries),TLA,1963,93626166816.1974
Latin America & the Caribbean (IDA & IBRD countries),TLA,1964,103992305875.075
Latin America & the Caribbean (IDA & IBRD countries),TLA,1965,111682430851.252
Latin America & the Caribbean (IDA & IBRD countries),TLA,1966,122549825339.491
Latin America & the Caribbean (IDA & IBRD countries),TLA,1967,125155133957.955
Latin America & the Caribbean (IDA & IBRD countries),TLA,1968,134570903699.431
Latin America & the Caribbean (IDA & IBRD countries),TLA,1969,150729643378.263
Latin America & the Caribbean (IDA & IBRD countries),TLA,1970,163725174761.275
Latin America & the Caribbean (IDA & IBRD countries),TLA,1971,182610803106.836
Latin America & the Caribbean (IDA & IBRD countries),TLA,1972,204996510050.965
Latin America & the Caribbean (IDA & IBRD countries),TLA,1973,270526368032.923
Latin America & the Caribbean (IDA & IBRD countries),TLA,1974,354486252123.827
Latin America & the Caribbean (IDA & IBRD countries),TLA,1975,370739061705.359
Latin America & the Caribbean (IDA & IBRD countries),TLA,1976,413041381928.784
Latin America & the Caribbean (IDA & IBRD countries),TLA,1977,455475546381.585
Latin America & the Caribbean (IDA & IBRD countries),TLA,1978,515069093882.068
Latin America & the Caribbean (IDA & IBRD countries),TLA,1979,616119854958.234
Latin America & the Caribbean (IDA & IBRD countries),TLA,1980,734465262528.934
Latin America & the Caribbean (IDA & IBRD countries),TLA,1981,849555797922.206
Latin America & the Caribbean (IDA & IBRD countries),TLA,1982,790096888081.284
Latin America & the Caribbean (IDA & IBRD countries),TLA,1983,694445874182.003
Latin America & the Caribbean (IDA & IBRD countries),TLA,1984,679865930114.882
Latin America & the Caribbean (IDA & IBRD countries),TLA,1985,701229908476.369
Latin America & the Caribbean (IDA & IBRD countries),TLA,1986,711095334203.764
Latin America & the Caribbean (IDA & IBRD countries),TLA,1987,746968952126.707
Latin America & the Caribbean (IDA & IBRD countries),TLA,1988,856981230259.337
Latin America & the Caribbean (IDA & IBRD countries),TLA,1989,941810162373.327
Latin America & the Caribbean (IDA & IBRD countries),TLA,1990,1100843309835.88
Latin America & the Caribbean (IDA & IBRD countries),TLA,1991,1372317945894.65
Latin America & the Caribbean (IDA & IBRD countries),TLA,1992,1290654691352.75
Latin America & the Caribbean (IDA & IBRD countries),TLA,1993,1493678182529.37
Latin America & the Caribbean (IDA & IBRD countries),TLA,1994,1715751583158.61
Latin America & the Caribbean (IDA & IBRD countries),TLA,1995,1829060058155.86
Latin America & the Caribbean (IDA & IBRD countries),TLA,1996,1975504627489.28
Latin America & the Caribbean (IDA & IBRD countries),TLA,1997,2164600526788.25
Latin America & the Caribbean (IDA & IBRD countries),TLA,1998,2173777212531.19
Latin America & the Caribbean (IDA & IBRD countries),TLA,1999,1946393638776
Latin America & the Caribbean (IDA & IBRD countries),TLA,2000,2150295806683.63
Latin America & the Caribbean (IDA & IBRD countries),TLA,2001,2083914185316.81
Latin America & the Caribbean (IDA & IBRD countries),TLA,2002,1851421107080.15
Latin America & the Caribbean (IDA & IBRD countries),TLA,2003,1903851095836.06
Latin America & the Caribbean (IDA & IBRD countries),TLA,2004,2210856081192.99
Latin America & the Caribbean (IDA & IBRD countries),TLA,2005,2694960334574.3
Latin America & the Caribbean (IDA & IBRD countries),TLA,2006,3171500014377.25
Latin America & the Caribbean (IDA & IBRD countries),TLA,2007,3760179560980.12
Latin America & the Caribbean (IDA & IBRD countries),TLA,2008,4392659455813.3
Latin America & the Caribbean (IDA & IBRD countries),TLA,2009,4116248823879.65
Latin America & the Caribbean (IDA & IBRD countries),TLA,2010,5142114727040.23
Latin America & the Caribbean (IDA & IBRD countries),TLA,2011,5863590521693.2
Latin America & the Caribbean (IDA & IBRD countries),TLA,2012,5912820697142.36
Latin America & the Caribbean (IDA & IBRD countries),TLA,2013,6058596339699.08
Latin America & the Caribbean (IDA & IBRD countries),TLA,2014,6171392349445.98
Latin America & the Caribbean (IDA & IBRD countries),TLA,2015,5247799483621.63
Latin America & the Caribbean (IDA & IBRD countries),TLA,2016,5094164385266.57
Least developed countries: UN classification,LDC,1985,120888467158.606
Least developed countries: UN classification,LDC,1986,131569338035.301
Least developed countries: UN classification,LDC,1987,143177200301.141
Least developed countries: UN classification,LDC,1988,146663532194.935
Least developed countries: UN classification,LDC,1989,152201964462.604
Least developed countries: UN classification,LDC,1990,156731265034.013
Least developed countries: UN classification,LDC,1991,160526313814.694
Least developed countries: UN classification,LDC,1992,141269409080.037
Least developed countries: UN classification,LDC,1993,143252490707.009
Least developed countries: UN classification,LDC,1994,133681898768.999
Least developed countries: UN classification,LDC,1995,152281115075.301
Least developed countries: UN classification,LDC,1996,168214011924.789
Least developed countries: UN classification,LDC,1997,178034867660.155
Least developed countries: UN classification,LDC,1998,179028450535.788
Least developed countries: UN classification,LDC,1999,181115109652.846
Least developed countries: UN classification,LDC,2000,205488833995.821
Least developed countries: UN classification,LDC,2001,195584775003.477
Least developed countries: UN classification,LDC,2002,211139725878.009
Least developed countries: UN classification,LDC,2003,239015609172.029
Least developed countries: UN classification,LDC,2004,274530562937.137
Least developed countries: UN classification,LDC,2005,321335591433.668
Least developed countries: UN classification,LDC,2006,377285037889.66
Least developed countries: UN classification,LDC,2007,459887867104.348
Least developed countries: UN classification,LDC,2008,571649437542.793
Least developed countries: UN classification,LDC,2009,582743051700.049
Least developed countries: UN classification,LDC,2010,661934469924.977
Least developed countries: UN classification,LDC,2011,751567270665.631
Least developed countries: UN classification,LDC,2012,798197144587.788
Least developed countries: UN classification,LDC,2013,866105358955.164
Least developed countries: UN classification,LDC,2014,938325885613.307
Least developed countries: UN classification,LDC,2015,926977420256.862
Least developed countries: UN classification,LDC,2016,940734369537.394
Low & middle income,LMY,1960,324352039781.982
Low & middle income,LMY,1961,312613286316.151
Low & middle income,LMY,1962,326841861893.587
Low & middle income,LMY,1963,351679457721.018
Low & middle income,LMY,1964,390766765752.802
Low & middle income,LMY,1965,431926537061.478
Low & middle income,LMY,1966,447443329876.854
Low & middle income,LMY,1967,459273990770.987
Low & middle income,LMY,1968,485885375069.178
Low & middle income,LMY,1969,543301898276.307
Low & middle income,LMY,1970,594912900423.441
Low & middle income,LMY,1971,642020284344.351
Low & middle income,LMY,1972,717743238064.388
Low & middle income,LMY,1973,907757167750.166
Low & middle income,LMY,1974,1160583259859.92
Low & middle income,LMY,1975,1284246415242.39
Low & middle income,LMY,1976,1390318678217.07
Low & middle income,LMY,1977,1564944377834.84
Low & middle income,LMY,1978,1698527173844.61
Low & middle income,LMY,1979,2019502691059.32
Low & middle income,LMY,1980,2357609885446.64
Low & middle income,LMY,1981,2535533249568.79
Low & middle income,LMY,1982,2521341858382.09
Low & middle income,LMY,1983,2474341829262.77
Low & middle income,LMY,1984,2511374030829.53
Low & middle income,LMY,1985,2646185053215.37
Low & middle income,LMY,1986,2767031904610.59
Low & middle income,LMY,1987,2844095463825.6
Low & middle income,LMY,1988,3077858862038.17
Low & middle income,LMY,1989,3273000286676.64
Low & middle income,LMY,1990,3681363833008.22
Low & middle income,LMY,1991,3925794817932.42
Low & middle income,LMY,1992,3880364023640.73
Low & middle income,LMY,1993,4138348394568.06
Low & middle income,LMY,1994,4486856393930.34
Low & middle income,LMY,1995,5019183141467.46
Low & middle income,LMY,1996,5470746988300.43
Low & middle income,LMY,1997,5784798609183.6
Low & middle income,LMY,1998,5602032771918.3
Low & middle income,LMY,1999,5470956851264.66
Low & middle income,LMY,2000,5969825199401.42
Low & middle income,LMY,2001,6026194954918.82
Low & middle income,LMY,2002,6150931010629.06
Low & middle income,LMY,2003,6958335915784.35
Low & middle income,LMY,2004,8260795423054.61
Low & middle income,LMY,2005,9842306859562.91
Low & middle income,LMY,2006,11697108619426.9
Low & middle income,LMY,2007,14509489193858.5
Low & middle income,LMY,2008,17424746490688.8
Low & middle income,LMY,2009,17023275071360.4
Low & middle income,LMY,2010,20751243965021.7
Low & middle income,LMY,2011,24508424849056.5
Low & middle income,LMY,2012,26088297830358.7
Low & middle income,LMY,2013,27661455979444.4
Low & middle income,LMY,2014,28704762101253.9
Low & middle income,LMY,2015,27198166090027.9
Low & middle income,LMY,2016,27299380819539.9
Low income,LIC,1981,76777083557.2715
Low income,LIC,1982,80237821909.1611
Low income,LIC,1983,74796244334.8535
Low income,LIC,1984,68688047480.5348
Low income,LIC,1985,71190299392.9494
Low income,LIC,1986,80779930657.2375
Low income,LIC,1987,84283995064.5725
Low income,LIC,1988,90950952690.8586
Low income,LIC,1989,89980034519.612
Low income,LIC,1990,95714254328.0519
Low income,LIC,1991,97729178471.6504
Low income,LIC,1992,86383121297.092
Low income,LIC,1993,86051188949.8247
Low income,LIC,1994,72587455091.5318
Low income,LIC,1995,83705340575.9305
Low income,LIC,1996,93313723634.6011
Low income,LIC,1997,96462655239.641
Low income,LIC,1998,97516392240.6341
Low income,LIC,1999,97617718260.914
Low income,LIC,2000,112687704932.46
Low income,LIC,2001,101760254592.161
Low income,LIC,2002,109911457198.004
Low income,LIC,2003,120719032496.609
Low income,LIC,2004,137615670728.403
Low income,LIC,2005,158963779474.829
Low income,LIC,2006,177840329532.654
Low income,LIC,2007,212769791288.202
Low income,LIC,2008,256172725778.412
Low income,LIC,2009,271232086169.742
Low income,LIC,2010,292339724487.545
Low income,LIC,2011,328781234807.069
Low income,LIC,2012,353927683499.204
Low income,LIC,2013,382592823547.049
Low income,LIC,2014,411931481585.539
Low income,LIC,2015,402390077968.574
Low income,LIC,2016,402524119028.794
Lower middle income,LMC,1965,137326339591.262
Lower middle income,LMC,1966,124411912027.875
Lower middle income,LMC,1967,132634611148.107
Lower middle income,LMC,1968,142216630532.313
Lower middle income,LMC,1969,158795498474.583
Lower middle income,LMC,1970,174710712969.92
Lower middle income,LMC,1971,181735953363.666
Lower middle income,LMC,1972,193138344594.827
Lower middle income,LMC,1973,230345726832.358
Lower middle income,LMC,1974,296101713075.74
Lower middle income,LMC,1975,328968990523.093
Lower middle income,LMC,1976,356861615692.609
Lower middle income,LMC,1977,408808711659.94
Lower middle income,LMC,1978,458039748301.706
Lower middle income,LMC,1979,522074506932.289
Lower middle income,LMC,1980,648971797083.754
Lower middle income,LMC,1981,685997455750.443
Lower middle income,LMC,1982,692704157982.478
Lower middle income,LMC,1983,675923420884.045
Lower middle income,LMC,1984,673275971022.756
Lower middle income,LMC,1985,708869952231.169
Lower middle income,LMC,1986,738150079103.442
Lower middle income,LMC,1987,809719315471.034
Lower middle income,LMC,1988,845625037859.514
Lower middle income,LMC,1989,860326050891.247
Lower middle income,LMC,1990,920986539698.062
Lower middle income,LMC,1991,887230344637.745
Lower middle income,LMC,1992,925514551252.778
Lower middle income,LMC,1993,940614921412.645
Lower middle income,LMC,1994,1021403738001.33
Lower middle income,LMC,1995,1147028091028.64
Lower middle income,LMC,1996,1259776454855.75
Lower middle income,LMC,1997,1300334144474.94
Lower middle income,LMC,1998,1169702131639.1
Lower middle income,LMC,1999,1270887612899.74
Lower middle income,LMC,2000,1343998928481.28
Lower middle income,LMC,2001,1356231036598.67
Lower middle income,LMC,2002,1458034560193.17
Lower middle income,LMC,2003,1672304190174.43
Lower middle income,LMC,2004,1911857905121
Lower middle income,LMC,2005,2205200074191.19
Lower middle income,LMC,2006,2626264404890.92
Lower middle income,LMC,2007,3232176784206.42
Lower middle income,LMC,2008,3637903033770.54
Lower middle income,LMC,2009,3727811301184.7
Lower middle income,LMC,2010,4666964528535.16
Lower middle income,LMC,2011,5278934620007.28
Lower middle income,LMC,2012,5535327445130.84
Lower middle income,LMC,2013,5774458157744.91
Lower middle income,LMC,2014,6076543198047.11
Lower middle income,LMC,2015,6017050158891.42
Lower middle income,LMC,2016,6263372909106.61
Middle East & North Africa,MEA,1968,32598497785.5043
Middle East & North Africa,MEA,1969,36384816241.1937
Middle East & North Africa,MEA,1970,41243011986.7202
Middle East & North Africa,MEA,1971,47614954968.8215
Middle East & North Africa,MEA,1972,58137916907.7533
Middle East & North Africa,MEA,1973,78314872620.6397
Middle East & North Africa,MEA,1974,142659976452.862
Middle East & North Africa,MEA,1975,155791345570.2
Middle East & North Africa,MEA,1976,193704316864.941
Middle East & North Africa,MEA,1977,224691986322.579
Middle East & North Africa,MEA,1978,238550083389.823
Middle East & North Africa,MEA,1979,311753032318.839
Middle East & North Africa,MEA,1980,402410542622.525
Middle East & North Africa,MEA,1981,415941395552.503
Middle East & North Africa,MEA,1982,414275165387.925
Middle East & North Africa,MEA,1983,420830232870.135
Middle East & North Africa,MEA,1984,426458764085.173
Middle East & North Africa,MEA,1985,432783155355.763
Middle East & North Africa,MEA,1986,442829428060.743
Middle East & North Africa,MEA,1987,411135918932.23
Middle East & North Africa,MEA,1988,408590542564.906
Middle East & North Africa,MEA,1989,420719668267.302
Middle East & North Africa,MEA,1990,550957452061.798
Middle East & North Africa,MEA,1991,553975106196.129
Middle East & North Africa,MEA,1992,603445097423.173
Middle East & North Africa,MEA,1993,607554327421.48
Middle East & North Africa,MEA,1994,633819758524.703
Middle East & North Africa,MEA,1995,708751921751.876
Middle East & North Africa,MEA,1996,802386209546.278
Middle East & North Africa,MEA,1997,832734025493.755
Middle East & North Africa,MEA,1998,809445659306.921
Middle East & North Africa,MEA,1999,866936558879.285
Middle East & North Africa,MEA,2000,967021642510.449
Middle East & North Africa,MEA,2001,970615931120.003
Middle East & North Africa,MEA,2002,966820093048.206
Middle East & North Africa,MEA,2003,1089098416129.6
Middle East & North Africa,MEA,2004,1271214902549.4
Middle East & North Africa,MEA,2005,1530143773484.47
Middle East & North Africa,MEA,2006,1790939429141.46
Middle East & North Africa,MEA,2007,2123322295847.04
Middle East & North Africa,MEA,2008,2647704729411.95
Middle East & North Africa,MEA,2009,2368231329944.26
Middle East & North Africa,MEA,2010,2767962267741.37
Middle East & North Africa,MEA,2011,3282392899960.52
Middle East & North Africa,MEA,2012,3529758430134.79
Middle East & North Africa,MEA,2013,3524023587337.77
Middle East & North Africa,MEA,2014,3563559183199.12
Middle East & North Africa,MEA,2015,3147279271333.8
Middle East & North Africa,MEA,2016,3144797691272.85
Middle East & North Africa (excluding high income),MNA,1993,291541399331.158
Middle East & North Africa (excluding high income),MNA,1994,298977280091.949
Middle East & North Africa (excluding high income),MNA,1995,340941052118.941
Middle East & North Africa (excluding high income),MNA,1996,395345201743.968
Middle East & North Africa (excluding high income),MNA,1997,406065741476.365
Middle East & North Africa (excluding high income),MNA,1998,412149531850.818
Middle East & North Africa (excluding high income),MNA,1999,435882790040.702
Middle East & North Africa (excluding high income),MNA,2000,451660439753.84
Middle East & North Africa (excluding high income),MNA,2001,467355993191.64
Middle East & North Africa (excluding high income),MNA,2002,453678358083.981
Middle East & North Africa (excluding high income),MNA,2003,511780801926.393
Middle East & North Africa (excluding high income),MNA,2004,592919911444.81
Middle East & North Africa (excluding high income),MNA,2005,698419820703.848
Middle East & North Africa (excluding high income),MNA,2006,811375431672.305
Middle East & North Africa (excluding high income),MNA,2007,1002832284121.99
Middle East & North Africa (excluding high income),MNA,2008,1235366170569.33
Middle East & North Africa (excluding high income),MNA,2009,1195903054603.52
Middle East & North Africa (excluding high income),MNA,2010,1383517142400.36
Middle East & North Africa (excluding high income),MNA,2011,1568522348029.8
Middle East & North Africa (excluding high income),MNA,2012,1681554531530.42
Middle East & North Africa (excluding high income),MNA,2013,1591675173595.67
Middle East & North Africa (excluding high income),MNA,2014,1591556264536.29
Middle East & North Africa (excluding high income),MNA,2015,1441977380056.15
Middle East & North Africa (excluding high income),MNA,2016,1453901029336.23
Middle East & North Africa (IDA & IBRD countries),TMN,1993,288738308055.187
Middle East & North Africa (IDA & IBRD countries),TMN,1994,296102694844.496
Middle East & North Africa (IDA & IBRD countries),TMN,1995,337619748312.89
Middle East & North Africa (IDA & IBRD countries),TMN,1996,391918726612.071
Middle East & North Africa (IDA & IBRD countries),TMN,1997,402270579724.805
Middle East & North Africa (IDA & IBRD countries),TMN,1998,408028236055.958
Middle East & North Africa (IDA & IBRD countries),TMN,1999,431557171032.094
Middle East & North Africa (IDA & IBRD countries),TMN,2000,447298299633.383
Middle East & North Africa (IDA & IBRD countries),TMN,2001,463334229256.801
Middle East & North Africa (IDA & IBRD countries),TMN,2002,450128157153.651
Middle East & North Africa (IDA & IBRD countries),TMN,2003,507822139212.327
Middle East & North Africa (IDA & IBRD countries),TMN,2004,588620268464.702
Middle East & North Africa (IDA & IBRD countries),TMN,2005,693623682832.889
Middle East & North Africa (IDA & IBRD countries),TMN,2006,806508983373.845
Middle East & North Africa (IDA & IBRD countries),TMN,2007,997382214929.026
Middle East & North Africa (IDA & IBRD countries),TMN,2008,1228766298998.44
Middle East & North Africa (IDA & IBRD countries),TMN,2009,1188669247677.49
Middle East & North Africa (IDA & IBRD countries),TMN,2010,1374620791146.31
Middle East & North Africa (IDA & IBRD countries),TMN,2011,1558059481133.08
Middle East & North Africa (IDA & IBRD countries),TMN,2012,1670273623778.57
Middle East & North Africa (IDA & IBRD countries),TMN,2013,1579070728219.37
Middle East & North Africa (IDA & IBRD countries),TMN,2014,1578695250599.14
Middle East & North Africa (IDA & IBRD countries),TMN,2015,1429091286052.15
Middle East & North Africa (IDA & IBRD countries),TMN,2016,1440244500023.14
Middle income,MIC,1960,310437531142.018
Middle income,MIC,1961,298648412877.056
Middle income,MIC,1962,311468382981.153
Middle income,MIC,1963,332421048707.661
Middle income,MIC,1964,375226353902.683
Middle income,MIC,1965,413375963383.153
Middle income,MIC,1966,427131280978.458
Middle income,MIC,1967,439772935021.306
Middle income,MIC,1968,465609726571.219
Middle income,MIC,1969,520593200616.881
Middle income,MIC,1970,571051591620.337
Middle income,MIC,1971,615837901975.016
Middle income,MIC,1972,688744783854.939
Middle income,MIC,1973,872905994078.695
Middle income,MIC,1974,1118905183097.78
Middle income,MIC,1975,1236622245605.82
Middle income,MIC,1976,1342534897220.62
Middle income,MIC,1977,1509988313453.65
Middle income,MIC,1978,1635672670590.98
Middle income,MIC,1979,1949883708918.23
Middle income,MIC,1980,2283263706870.42
Middle income,MIC,1981,2463300015085.58
Middle income,MIC,1982,2445934783634.42
Middle income,MIC,1983,2403969281851.92
Middle income,MIC,1984,2446595238891.12
Middle income,MIC,1985,2579016642990.23
Middle income,MIC,1986,2691034790438.57
Middle income,MIC,1987,2764805339370.34
Middle income,MIC,1988,2992285219942.15
Middle income,MIC,1989,3188472195720.25
Middle income,MIC,1990,3590739499695.05
Middle income,MIC,1991,3832851639411.71
Middle income,MIC,1992,3797576030038.01
Middle income,MIC,1993,4055490739057.9
Middle income,MIC,1994,4415239786153.69
Middle income,MIC,1995,4936867401153.25
Middle income,MIC,1996,5379214787657.32
Middle income,MIC,1997,5689936118126.09
Middle income,MIC,1998,5506592879356.91
Middle income,MIC,1999,5375673183280.96
Middle income,MIC,2000,5860476849478.68
Middle income,MIC,2001,5926243420202.93
Middle income,MIC,2002,6043506326546.43
Middle income,MIC,2003,6840046171605.47
Middle income,MIC,2004,8125459303288.47
Middle income,MIC,2005,9685508836558.34
Middle income,MIC,2006,11520622409819.2
Middle income,MIC,2007,14297537214845.2
Middle income,MIC,2008,17169626138363.2
Middle income,MIC,2009,16755625847152.6
Middle income,MIC,2010,20458605049763.3
Middle income,MIC,2011,24178441710181.1
Middle income,MIC,2012,25733320245004.3
Middle income,MIC,2013,27278175113689
Middle income,MIC,2014,28292772740185.1
Middle income,MIC,2015,26796051573771.1
Middle income,MIC,2016,26897069180752.8
North America,NAC,1960,584477920198.99
North America,NAC,1961,604157219440.397
North America,NAC,1962,647173002027.413
North America,NAC,1963,683353535761.531
North America,NAC,1964,734790505460.858
North America,NAC,1965,797723909391.131
North America,NAC,1966,875492805408.936
North America,NAC,1967,926623934246.798
North America,NAC,1968,1013409031841.72
North America,NAC,1969,1097952410241.71
North America,NAC,1970,1163966395224.42
North America,NAC,1971,1267253061477.52
North America,NAC,1972,1395767220992.02
North America,NAC,1973,1560140359214.08
North America,NAC,1974,1709546297648.26
North America,NAC,1975,1863102029787.65
North America,NAC,1976,2084548864401.62
North America,NAC,1977,2298010156934.65
North America,NAC,1978,2575679667449.81
North America,NAC,1979,2875732302185.42
North America,NAC,1980,3136972126345.01
North America,NAC,1981,3517909963656.99
North America,NAC,1982,3659283025119.14
North America,NAC,1983,3979574111781.89
North America,NAC,1984,4397051258071.62
North America,NAC,1985,4712529999482.75
North America,NAC,1986,4968766427343.98
North America,NAC,1987,5302830242049.45
North America,NAC,1988,5761398451214.26
North America,NAC,1989,6224250243275.25
North America,NAC,1990,6575110950908.47
North America,NAC,1991,6786006083611.19
North America,NAC,1992,7133366589284.92
North America,NAC,1993,7457709121892.44
North America,NAC,1994,7888761439501.61
North America,NAC,1995,8270122373385.4
North America,NAC,1996,8731442777972.13
North America,NAC,1997,9264273191726.28
North America,NAC,1998,9724112027406.81
North America,NAC,1999,10340031087640.9
North America,NAC,2000,11030552667252.6
North America,NAC,2001,11361884260892.6
North America,NAC,2002,11739401906646.5
North America,NAC,2003,12407237511367.9
North America,NAC,2004,13302608706074.6
North America,NAC,2005,14267952115864.7
North America,NAC,2006,15176717496461.2
North America,NAC,2007,15948507238205.8
North America,NAC,2008,16273823136997.2
North America,NAC,2009,15795698382986.4
North America,NAC,2010,16583580836811.1
North America,NAC,2011,17312124677047.8
North America,NAC,2012,17985081294447.6
North America,NAC,2013,18539718715830.2
North America,NAC,2014,19191755961783.7
North America,NAC,2015,19679438002855
North America,NAC,2016,20160296406469
OECD members,OED,1960,1071151663882.99
OECD members,OED,1961,1125836224221.95
OECD members,OED,1962,1215845014894.6
OECD members,OED,1963,1310287602701.9
OECD members,OED,1964,1431891379192.19
OECD members,OED,1965,1554550842540.55
OECD members,OED,1966,1706877036393.04
OECD members,OED,1967,1831606284595.87
OECD members,OED,1968,1985490670885.15
OECD members,OED,1969,2179233336624.44
OECD members,OED,1970,2391320615403.16
OECD members,OED,1971,2647345043163.25
OECD members,OED,1972,3072028734454.76
OECD members,OED,1973,3711074678837.23
OECD members,OED,1974,4160937326082.87
OECD members,OED,1975,4661490915492.44
OECD members,OED,1976,5052200868363.1
OECD members,OED,1977,5696478213400.13
OECD members,OED,1978,6839135386296.08
OECD members,OED,1979,7900438156657.4
OECD members,OED,1980,8767216244691.62
OECD members,OED,1981,8925303576239.52
OECD members,OED,1982,8790114836556.78
OECD members,OED,1983,9082103807547.21
OECD members,OED,1984,9498137861435.62
OECD members,OED,1985,10019910060569.3
OECD members,OED,1986,12146061684173.7
OECD members,OED,1987,14059024255587.2
OECD members,OED,1988,15862084044875.5
OECD members,OED,1989,16617153794891.2
OECD members,OED,1990,18724931470880.4
OECD members,OED,1991,19808187927613.1
OECD members,OED,1992,21297422608895.7
OECD members,OED,1993,21614117695209.3
OECD members,OED,1994,23079926696878.3
OECD members,OED,1995,25426718095808.1
OECD members,OED,1996,25649031760273.7
OECD members,OED,1997,25256524647400.9
OECD members,OED,1998,25514762246702.8
OECD members,OED,1999,26812851271077.9
OECD members,OED,2000,27377494105020.7
OECD members,OED,2001,27119560819451.4
OECD members,OED,2002,28300399222991.1
OECD members,OED,2003,31707727753865
OECD members,OED,2004,35294013497764.2
OECD members,OED,2005,37307466029985.7
OECD members,OED,2006,39332321300368.7
OECD members,OED,2007,42993214955769.3
OECD members,OED,2008,45511036479861.9
OECD members,OED,2009,42579663711880.8
OECD members,OED,2010,44606246604350.6
OECD members,OED,2011,47923365513452.4
OECD members,OED,2012,47828497828091.3
OECD members,OED,2013,48405202092121.3
OECD members,OED,2014,49370080089669.8
OECD members,OED,2015,46659020669553.3
OECD members,OED,2016,47552622005124.2
Other small states,OSS,1970,3135485929.05746
Other small states,OSS,1971,3722050816.43262
Other small states,OSS,1972,4507335667.09253
Other small states,OSS,1973,6528025335.16404
Other small states,OSS,1974,12027202399.3617
Other small states,OSS,1975,13422131920.7262
Other small states,OSS,1976,16684803375.7533
Other small states,OSS,1977,18792081785.7577
Other small states,OSS,1978,20733786068.7394
Other small states,OSS,1979,26918040735.5116
Other small states,OSS,1980,37367820731.31
Other small states,OSS,1981,37571474568.1661
Other small states,OSS,1982,35538132656.6907
Other small states,OSS,1983,33565476345.9185
Other small states,OSS,1984,33809943282.4754
Other small states,OSS,1985,32123247560.6555
Other small states,OSS,1986,32502566977.8393
Other small states,OSS,1987,38579939947.3423
Other small states,OSS,1988,43353826990.6721
Other small states,OSS,1989,45401718442.5696
Other small states,OSS,1990,54310263044.6248
Other small states,OSS,1991,55933105364.3667
Other small states,OSS,1992,61013627265.7437
Other small states,OSS,1993,58033167762.4571
Other small states,OSS,1994,60783020994.9157
Other small states,OSS,1995,69642896354.1044
Other small states,OSS,1996,73535877988.0817
Other small states,OSS,1997,76645392483.0042
Other small states,OSS,1998,75106297715.9465
Other small states,OSS,1999,80832351746.3218
Other small states,OSS,2000,91599121612.5562
Other small states,OSS,2001,91053518663.7084
Other small states,OSS,2002,98187518524.7255
Other small states,OSS,2003,121659449226.936
Other small states,OSS,2004,150738716809.607
Other small states,OSS,2005,182941015936.82
Other small states,OSS,2006,215038691231.13
Other small states,OSS,2007,263061876005.783
Other small states,OSS,2008,321654726632.743
Other small states,OSS,2009,276256069732.069
Other small states,OSS,2010,320785945703.061
Other small states,OSS,2011,395817095569.3
Other small states,OSS,2012,413323181283.977
Other small states,OSS,2013,431007987532.881
Other small states,OSS,2014,444728412944.398
Other small states,OSS,2015,369948348463.501
Other small states,OSS,2016,362079512486.165
Pacific island small states,PSS,1975,1119628656.50705
Pacific island small states,PSS,1976,1122702099.50737
Pacific island small states,PSS,1977,1171337765.53249
Pacific island small states,PSS,1978,1358461653.63425
Pacific island small states,PSS,1979,1664351537.51441
Pacific island small states,PSS,1980,1904927595.90678
Pacific island small states,PSS,1981,1963995650.83804
Pacific island small states,PSS,1982,1918438076.32243
Pacific island small states,PSS,1983,1837237466.17526
Pacific island small states,PSS,1984,2014185769.40517
Pacific island small states,PSS,1985,1906817963.83447
Pacific island small states,PSS,1986,2070081366.108
Pacific island small states,PSS,1987,2033588818.81467
Pacific island small states,PSS,1988,2130603255.0409
Pacific island small states,PSS,1989,2224857784.68561
Pacific island small states,PSS,1990,2396520508.53893
Pacific island small states,PSS,1991,2548876959.76577
Pacific island small states,PSS,1992,2794581115.05935
Pacific island small states,PSS,1993,2946263929.07455
Pacific island small states,PSS,1994,3395406278.25741
Pacific island small states,PSS,1995,3668261062.14152
Pacific island small states,PSS,1996,3939097726.92624
Pacific island small states,PSS,1997,3935303220.26046
Pacific island small states,PSS,1998,3383565222.10163
Pacific island small states,PSS,1999,3685135085.34515
Pacific island small states,PSS,2000,3447191071.35042
Pacific island small states,PSS,2001,3373827097.70278
Pacific island small states,PSS,2002,3545230257.97584
Pacific island small states,PSS,2003,4157082463.76922
Pacific island small states,PSS,2004,4802142869.55194
Pacific island small states,PSS,2005,5271518870.10471
Pacific island small states,PSS,2006,5541929392.89878
Pacific island small states,PSS,2007,6078976595.05599
Pacific island small states,PSS,2008,6554173386.85826
Pacific island small states,PSS,2009,5778915418.32836
Pacific island small states,PSS,2010,6404608139.42234
Pacific island small states,PSS,2011,7589010905.92656
Pacific island small states,PSS,2012,8110535070.84161
Pacific island small states,PSS,2013,8376051896.5881
Pacific island small states,PSS,2014,8769297682.30012
Pacific island small states,PSS,2015,8596930890.68014
Pacific island small states,PSS,2016,9019651488.34122
Post-demographic dividend,PST,1960,1044694546864.67
Post-demographic dividend,PST,1961,1104273220370.61
Post-demographic dividend,PST,1962,1192952502812.39
Post-demographic dividend,PST,1963,1284268984955.24
Post-demographic dividend,PST,1964,1401724839472.33
Post-demographic dividend,PST,1965,1522591664917.55
Post-demographic dividend,PST,1966,1669676469245.28
Post-demographic dividend,PST,1967,1791672516868.83
Post-demographic dividend,PST,1968,1941658821103.07
Post-demographic dividend,PST,1969,2129887918389.55
Post-demographic dividend,PST,1970,2341015790196.05
Post-demographic dividend,PST,1971,2595579358368.19
Post-demographic dividend,PST,1972,3010702895808.04
Post-demographic dividend,PST,1973,3633614842108.87
Post-demographic dividend,PST,1974,4057814746795.36
Post-demographic dividend,PST,1975,4546622138565.25
Post-demographic dividend,PST,1976,4933267248975.17
Post-demographic dividend,PST,1977,5576369051739.66
Post-demographic dividend,PST,1978,6699713409007.45
Post-demographic dividend,PST,1979,7702380697690.26
Post-demographic dividend,PST,1980,8529274582208.96
Post-demographic dividend,PST,1981,8627934761431.89
Post-demographic dividend,PST,1982,8586194508706.93
Post-demographic dividend,PST,1983,8907635675026.94
Post-demographic dividend,PST,1984,9311345442980.63
Post-demographic dividend,PST,1985,9820703037814.2
Post-demographic dividend,PST,1986,11993129678079.9
Post-demographic dividend,PST,1987,13893300505029.3
Post-demographic dividend,PST,1988,15650090338734.4
Post-demographic dividend,PST,1989,16364316163380.8
Post-demographic dividend,PST,1990,18374666517986.9
Post-demographic dividend,PST,1991,19372103797078.9
Post-demographic dividend,PST,1992,20789111705356.5
Post-demographic dividend,PST,1993,20958411988551.6
Post-demographic dividend,PST,1994,22430535276119.6
Post-demographic dividend,PST,1995,24868835052199
Post-demographic dividend,PST,1996,24999441859313.7
Post-demographic dividend,PST,1997,24527784149401.8
Post-demographic dividend,PST,1998,24630990896065.6
Post-demographic dividend,PST,1999,25855199153753.9
Post-demographic dividend,PST,2000,26296254682897.8
Post-demographic dividend,PST,2001,26051043083759.2
Post-demographic dividend,PST,2002,27170861516880.7
Post-demographic dividend,PST,2003,30481623264492
Post-demographic dividend,PST,2004,33868895058424.8
Post-demographic dividend,PST,2005,35650152444993.6
Post-demographic dividend,PST,2006,37496417841637.7
Post-demographic dividend,PST,2007,40892362902172.6
Post-demographic dividend,PST,2008,43204147782206.9
Post-demographic dividend,PST,2009,40676229442861.5
Post-demographic dividend,PST,2010,42413555466432
Post-demographic dividend,PST,2011,45525572709993.5
Post-demographic dividend,PST,2012,45453811718316.9
Post-demographic dividend,PST,2013,45848629855778.7
Post-demographic dividend,PST,2014,46735043393834.4
Post-demographic dividend,PST,2015,44242836057681.5
Post-demographic dividend,PST,2016,45213309475250
Pre-demographic dividend,PRE,1960,10398348179.549
Pre-demographic dividend,PRE,1961,10744202037.2057
Pre-demographic dividend,PRE,1962,11741666829.9021
Pre-demographic dividend,PRE,1963,13703430496.9909
Pre-demographic dividend,PRE,1964,12738674207.236
Pre-demographic dividend,PRE,1965,14368795335.6958
Pre-demographic dividend,PRE,1966,15799001649.5047
Pre-demographic dividend,PRE,1967,14899844603.9385
Pre-demographic dividend,PRE,1968,15708848569.17
Pre-demographic dividend,PRE,1969,17861212683.8571
Pre-demographic dividend,PRE,1970,21854100496.1789
Pre-demographic dividend,PRE,1971,21365342794.9241
Pre-demographic dividend,PRE,1972,24753198262.2301
Pre-demographic dividend,PRE,1973,30347820635.4717
Pre-demographic dividend,PRE,1974,43401484420.1474
Pre-demographic dividend,PRE,1975,49322046233.311
Pre-demographic dividend,PRE,1976,58044815995.8377
Pre-demographic dividend,PRE,1977,64367398025.2324
Pre-demographic dividend,PRE,1978,71557911568.6735
Pre-demographic dividend,PRE,1979,90472481235.2135
Pre-demographic dividend,PRE,1980,110634541736.74
Pre-demographic dividend,PRE,1981,99446432259.5959
Pre-demographic dividend,PRE,1982,96056301100.604
Pre-demographic dividend,PRE,1983,81949458261.8683
Pre-demographic dividend,PRE,1984,80839093482.9974
Pre-demographic dividend,PRE,1985,83918139386.1619
Pre-demographic dividend,PRE,1986,86468659533.8348
Pre-demographic dividend,PRE,1987,98640481086.672
Pre-demographic dividend,PRE,1988,101491555405.13
Pre-demographic dividend,PRE,1989,103556833461.826
Pre-demographic dividend,PRE,1990,166763060661.842
Pre-demographic dividend,PRE,1991,166247954701.582
Pre-demographic dividend,PRE,1992,151742111972.016
Pre-demographic dividend,PRE,1993,140181890979.475
Pre-demographic dividend,PRE,1994,127916911098.575
Pre-demographic dividend,PRE,1995,155730586475.494
Pre-demographic dividend,PRE,1996,173363219243.523
Pre-demographic dividend,PRE,1997,181117325058.646
Pre-demographic dividend,PRE,1998,179147671572.904
Pre-demographic dividend,PRE,1999,181503604085.815
Pre-demographic dividend,PRE,2000,211740549669.908
Pre-demographic dividend,PRE,2001,200656944157.417
Pre-demographic dividend,PRE,2002,236773864107.249
Pre-demographic dividend,PRE,2003,273883007962.629
Pre-demographic dividend,PRE,2004,332472934465.613
Pre-demographic dividend,PRE,2005,411274166611.459
Pre-demographic dividend,PRE,2006,514532516145.455
Pre-demographic dividend,PRE,2007,630727513486.316
Pre-demographic dividend,PRE,2008,805266578757.073
Pre-demographic dividend,PRE,2009,728798829297.898
Pre-demographic dividend,PRE,2010,1009752002887.76
Pre-demographic dividend,PRE,2011,1166443463426.99
Pre-demographic dividend,PRE,2012,1281751975521.8
Pre-demographic dividend,PRE,2013,1401710558076.06
Pre-demographic dividend,PRE,2014,1496971200328.02
Pre-demographic dividend,PRE,2015,1300758076730.85
Pre-demographic dividend,PRE,2016,1207787697187.08
Small states,SST,1970,7934786923.25918
Small states,SST,1971,8928415780.97344
Small states,SST,1972,10537522547.3878
Small states,SST,1973,13126879314.3455
Small states,SST,1974,20404459472.0772
Small states,SST,1975,23223444445.9691
Small states,SST,1976,26542237355.2539
Small states,SST,1977,30144018492.8051
Small states,SST,1978,32393448088.7416
Small states,SST,1979,40219637900.6332
Small states,SST,1980,53301689401.3476
Small states,SST,1981,55004873035.026
Small states,SST,1982,54713643064.0958
Small states,SST,1983,52815264029.9197
Small states,SST,1984,52234388082.1652
Small states,SST,1985,50161815201.5064
Small states,SST,1986,49006470880.2802
Small states,SST,1987,56064140276.8344
Small states,SST,1988,61865042439.9101
Small states,SST,1989,64248116732.2638
Small states,SST,1990,74599350281.0177
Small states,SST,1991,76109647373.8511
Small states,SST,1992,81024550302.5607
Small states,SST,1993,79207007623.0797
Small states,SST,1994,83473610537.821
Small states,SST,1995,94366389839.5722
Small states,SST,1996,100450040957.874
Small states,SST,1997,106278152760.984
Small states,SST,1998,106764286056.054
Small states,SST,1999,114558598920.374
Small states,SST,2000,127298727790.748
Small states,SST,2001,127600897387.118
Small states,SST,2002,136678803904.615
Small states,SST,2003,163313573580.072
Small states,SST,2004,196715975572.352
Small states,SST,2005,234865582860.024
Small states,SST,2006,272995523519.706
Small states,SST,2007,327512314572.132
Small states,SST,2008,394805442837.866
Small states,SST,2009,337922462226.829
Small states,SST,2010,388136053426.768
Small states,SST,2011,469603698352.062
Small states,SST,2012,492081568847.453
Small states,SST,2013,510668854077.463
Small states,SST,2014,524890495443.575
Small states,SST,2015,448061495601.159
Small states,SST,2016,437803722143.8
South Asia,SAS,1960,46535882349.5353
South Asia,SAS,1961,49639265057.888
South Asia,SAS,1962,52969959487.1425
South Asia,SAS,1963,59564124018.8379
South Asia,SAS,1964,68207240591.276
South Asia,SAS,1965,73302133559.0127
South Asia,SAS,1966,61638106877.0695
South Asia,SAS,1967,67859668331.0437
South Asia,SAS,1968,71227636447.081
South Asia,SAS,1969,78199356804.7733
South Asia,SAS,1970,84723556607.1639
South Asia,SAS,1971,90042201738.5115
South Asia,SAS,1972,90429767477.282
South Asia,SAS,1973,103394104059.765
South Asia,SAS,1974,125253027719.799
South Asia,SAS,1975,134416247897.745
South Asia,SAS,1976,131167736496.194
South Asia,SAS,1977,151656859736.336
South Asia,SAS,1978,172583702486.213
South Asia,SAS,1979,193318644211.614
South Asia,SAS,1980,233086150890.282
South Asia,SAS,1981,247106727889.629
South Asia,SAS,1982,255647758194.56
South Asia,SAS,1983,270545959907.086
South Asia,SAS,1984,269355371620.121
South Asia,SAS,1985,292874261367.599
South Asia,SAS,1986,310147312221.755
South Asia,SAS,1987,344338564247.538
South Asia,SAS,1988,370046274628.889
South Asia,SAS,1989,373481452092.266
South Asia,SAS,1990,402050004575.523
South Asia,SAS,1991,357724016271.72
South Asia,SAS,1992,379830007892.912
South Asia,SAS,1993,376239667457.364
South Asia,SAS,1994,426649315425.987
South Asia,SAS,1995,474034412840.605
South Asia,SAS,1996,518624561849.029
South Asia,SAS,1997,544005563623.853
South Asia,SAS,1998,551628275407.375
South Asia,SAS,1999,590948715637.076
South Asia,SAS,2000,614756473708.65
South Asia,SAS,2001,630828017007.045
South Asia,SAS,2002,663250167513.213
South Asia,SAS,2003,774466662241.158
South Asia,SAS,2004,897926604903.83
South Asia,SAS,2005,1028639938471.39
South Asia,SAS,2006,1176253735122.35
South Asia,SAS,2007,1488693557083.01
South Asia,SAS,2008,1515641609304.52
South Asia,SAS,2009,1665589062548.31
South Asia,SAS,2010,2042141855806.9
South Asia,SAS,2011,2272006394117.54
South Asia,SAS,2012,2297909547839.05
South Asia,SAS,2013,2356659793779.43
South Asia,SAS,2014,2577691553786.73
South Asia,SAS,2015,2682804385971.41
South Asia,SAS,2016,2892480763179.47
South Asia (IDA & IBRD),TSA,1960,46535882349.5353
South Asia (IDA & IBRD),TSA,1961,49639265057.888
South Asia (IDA & IBRD),TSA,1962,52969959487.1425
South Asia (IDA & IBRD),TSA,1963,59564124018.8379
South Asia (IDA & IBRD),TSA,1964,68207240591.2761
South Asia (IDA & IBRD),TSA,1965,73302133559.0127
South Asia (IDA & IBRD),TSA,1966,61638106877.0695
South Asia (IDA & IBRD),TSA,1967,67859668331.0437
South Asia (IDA & IBRD),TSA,1968,71227636447.081
South Asia (IDA & IBRD),TSA,1969,78199356804.7733
South Asia (IDA & IBRD),TSA,1970,84723556607.1639
South Asia (IDA & IBRD),TSA,1971,90042201738.5116
South Asia (IDA & IBRD),TSA,1972,90429767477.282
South Asia (IDA & IBRD),TSA,1973,103394104059.765
South Asia (IDA & IBRD),TSA,1974,125253027719.799
South Asia (IDA & IBRD),TSA,1975,134416247897.745
South Asia (IDA & IBRD),TSA,1976,131167736496.194
South Asia (IDA & IBRD),TSA,1977,151656859736.336
South Asia (IDA & IBRD),TSA,1978,172583702486.213
South Asia (IDA & IBRD),TSA,1979,193318644211.614
South Asia (IDA & IBRD),TSA,1980,233086150890.282
South Asia (IDA & IBRD),TSA,1981,247106727889.629
South Asia (IDA & IBRD),TSA,1982,255647758194.56
South Asia (IDA & IBRD),TSA,1983,270545959907.086
South Asia (IDA & IBRD),TSA,1984,269355371620.121
South Asia (IDA & IBRD),TSA,1985,292874261367.599
South Asia (IDA & IBRD),TSA,1986,310147312221.756
South Asia (IDA & IBRD),TSA,1987,344338564247.538
South Asia (IDA & IBRD),TSA,1988,370046274628.889
South Asia (IDA & IBRD),TSA,1989,373481452092.266
South Asia (IDA & IBRD),TSA,1990,402050004575.523
South Asia (IDA & IBRD),TSA,1991,357724016271.72
South Asia (IDA & IBRD),TSA,1992,379830007892.912
South Asia (IDA & IBRD),TSA,1993,376239667457.364
South Asia (IDA & IBRD),TSA,1994,426649315425.987
South Asia (IDA & IBRD),TSA,1995,474034412840.605
South Asia (IDA & IBRD),TSA,1996,518624561849.029
South Asia (IDA & IBRD),TSA,1997,544005563623.853
South Asia (IDA & IBRD),TSA,1998,551628275407.375
South Asia (IDA & IBRD),TSA,1999,590948715637.076
South Asia (IDA & IBRD),TSA,2000,614756473708.65
South Asia (IDA & IBRD),TSA,2001,630828017007.045
South Asia (IDA & IBRD),TSA,2002,663250167513.213
South Asia (IDA & IBRD),TSA,2003,774466662241.158
South Asia (IDA & IBRD),TSA,2004,897926604903.83
South Asia (IDA & IBRD),TSA,2005,1028639938471.39
South Asia (IDA & IBRD),TSA,2006,1176253735122.35
South Asia (IDA & IBRD),TSA,2007,1488693557083.01
South Asia (IDA & IBRD),TSA,2008,1515641609304.52
South Asia (IDA & IBRD),TSA,2009,1665589062548.31
South Asia (IDA & IBRD),TSA,2010,2042141855806.9
South Asia (IDA & IBRD),TSA,2011,2272006394117.54
South Asia (IDA & IBRD),TSA,2012,2297909547839.05
South Asia (IDA & IBRD),TSA,2013,2356659793779.43
South Asia (IDA & IBRD),TSA,2014,2577691553786.73
South Asia (IDA & IBRD),TSA,2015,2682804385971.41
South Asia (IDA & IBRD),TSA,2016,2892480763179.47
Sub-Saharan Africa,SSF,1960,30293454848.2105
Sub-Saharan Africa,SSF,1961,31465076775.5305
Sub-Saharan Africa,SSF,1962,34104849889.4766
Sub-Saharan Africa,SSF,1963,39106436783.5605
Sub-Saharan Africa,SSF,1964,38154669432.4731
Sub-Saharan Africa,SSF,1965,42511265775.887
Sub-Saharan Africa,SSF,1966,45892007068.4289
Sub-Saharan Africa,SSF,1967,45355789870.4112
Sub-Saharan Africa,SSF,1968,48511689901.6278
Sub-Saharan Africa,SSF,1969,55619101230.4241
Sub-Saharan Africa,SSF,1970,65441663595.2528
Sub-Saharan Africa,SSF,1971,66584540143.7838
Sub-Saharan Africa,SSF,1972,75015704819.2867
Sub-Saharan Africa,SSF,1973,95886132380.8826
Sub-Saharan Africa,SSF,1974,125666113209.184
Sub-Saharan Africa,SSF,1975,138201570744.764
Sub-Saharan Africa,SSF,1976,150065750976.478
Sub-Saharan Africa,SSF,1977,165419484974.18
Sub-Saharan Africa,SSF,1978,182804718774.66
Sub-Saharan Africa,SSF,1979,220049397934.685
Sub-Saharan Africa,SSF,1980,276325613788.158
Sub-Saharan Africa,SSF,1981,278746905466.921
Sub-Saharan Africa,SSF,1982,260407279021.102
Sub-Saharan Africa,SSF,1983,242438533416.832
Sub-Saharan Africa,SSF,1984,230830117319.801
Sub-Saharan Africa,SSF,1985,215111614796.826
Sub-Saharan Africa,SSF,1986,238400378521.777
Sub-Saharan Africa,SSF,1987,280930550942.236
Sub-Saharan Africa,SSF,1988,295523690332.111
Sub-Saharan Africa,SSF,1989,309182519793.758
Sub-Saharan Africa,SSF,1990,309656772694.718
Sub-Saharan Africa,SSF,1991,319139026333.247
Sub-Saharan Africa,SSF,1992,313874505716.532
Sub-Saharan Africa,SSF,1993,300038498591.01
Sub-Saharan Africa,SSF,1994,292189333027.886
Sub-Saharan Africa,SSF,1995,337411634256.534
Sub-Saharan Africa,SSF,1996,348828092040.987
Sub-Saharan Africa,SSF,1997,361006709281.608
Sub-Saharan Africa,SSF,1998,340572456123.532
Sub-Saharan Africa,SSF,1999,342916454500.386
Sub-Saharan Africa,SSF,2000,367679644790.853
Sub-Saharan Africa,SSF,2001,342345476693.071
Sub-Saharan Africa,SSF,2002,366969503176.655
Sub-Saharan Africa,SSF,2003,468505411662.939
Sub-Saharan Africa,SSF,2004,583461060225.834
Sub-Saharan Africa,SSF,2005,685226908393.033
Sub-Saharan Africa,SSF,2006,802075288542.163
Sub-Saharan Africa,SSF,2007,933327105483.533
Sub-Saharan Africa,SSF,2008,1067466936503.72
Sub-Saharan Africa,SSF,2009,1022616202357.64
Sub-Saharan Africa,SSF,2010,1365815003522.17
Sub-Saharan Africa,SSF,2011,1537231271076.8
Sub-Saharan Africa,SSF,2012,1612110026187.15
Sub-Saharan Africa,SSF,2013,1698517981177.86
Sub-Saharan Africa,SSF,2014,1780285270973.27
Sub-Saharan Africa,SSF,2015,1605874046218.37
Sub-Saharan Africa,SSF,2016,1512596044161.42
Sub-Saharan Africa (excluding high income),SSA,1960,30282688202.5902
Sub-Saharan Africa (excluding high income),SSA,1961,31454913188.7513
Sub-Saharan Africa (excluding high income),SSA,1962,34093744323.7056
Sub-Saharan Africa (excluding high income),SSA,1963,39094362715.9907
Sub-Saharan Africa (excluding high income),SSA,1964,38140805165.2228
Sub-Saharan Africa (excluding high income),SSA,1965,42497601517.868
Sub-Saharan Africa (excluding high income),SSA,1966,45877717974.5334
Sub-Saharan Africa (excluding high income),SSA,1967,45341229114.3769
Sub-Saharan Africa (excluding high income),SSA,1968,48498076332.2064
Sub-Saharan Africa (excluding high income),SSA,1969,55605752590.73
Sub-Saharan Africa (excluding high income),SSA,1970,65427015247.3062
Sub-Saharan Africa (excluding high income),SSA,1971,66565970097.9985
Sub-Saharan Africa (excluding high income),SSA,1972,74988052256.6631
Sub-Saharan Africa (excluding high income),SSA,1973,95853382652.8724
Sub-Saharan Africa (excluding high income),SSA,1974,125629150789.938
Sub-Saharan Africa (excluding high income),SSA,1975,138160503656.034
Sub-Saharan Africa (excluding high income),SSA,1976,150024157646.685
Sub-Saharan Africa (excluding high income),SSA,1977,165362050849.068
Sub-Saharan Africa (excluding high income),SSA,1978,182725066759.896
Sub-Saharan Africa (excluding high income),SSA,1979,219925937375.486
Sub-Saharan Africa (excluding high income),SSA,1980,276184722336.96
Sub-Saharan Africa (excluding high income),SSA,1981,278597853235.486
Sub-Saharan Africa (excluding high income),SSA,1982,260264589147.935
Sub-Saharan Africa (excluding high income),SSA,1983,242295997168.792
Sub-Saharan Africa (excluding high income),SSA,1984,230681896256.8
Sub-Saharan Africa (excluding high income),SSA,1985,214943487938.231
Sub-Saharan Africa (excluding high income),SSA,1986,238192518260.502
Sub-Saharan Africa (excluding high income),SSA,1987,280681131373.112
Sub-Saharan Africa (excluding high income),SSA,1988,295238997460.339
Sub-Saharan Africa (excluding high income),SSA,1989,308876668854.173
Sub-Saharan Africa (excluding high income),SSA,1990,309286253188.394
Sub-Saharan Africa (excluding high income),SSA,1991,318762752488.883
Sub-Saharan Africa (excluding high income),SSA,1992,313438008904.04
Sub-Saharan Africa (excluding high income),SSA,1993,299561111282.797
Sub-Saharan Africa (excluding high income),SSA,1994,291699180590.638
Sub-Saharan Africa (excluding high income),SSA,1995,336899828856.759
Sub-Saharan Africa (excluding high income),SSA,1996,348321606632.535
Sub-Saharan Africa (excluding high income),SSA,1997,360439668356.04
Sub-Saharan Africa (excluding high income),SSA,1998,339959239241.738
Sub-Saharan Africa (excluding high income),SSA,1999,342288453546.952
Sub-Saharan Africa (excluding high income),SSA,2000,367060072093.125
Sub-Saharan Africa (excluding high income),SSA,2001,341718203479.383
Sub-Saharan Africa (excluding high income),SSA,2002,366266226628.11
Sub-Saharan Africa (excluding high income),SSA,2003,467794698562.701
Sub-Saharan Africa (excluding high income),SSA,2004,582616004511.318
Sub-Saharan Africa (excluding high income),SSA,2005,684301913492.808
Sub-Saharan Africa (excluding high income),SSA,2006,801052727346.296
Sub-Saharan Africa (excluding high income),SSA,2007,932288287192.586
Sub-Saharan Africa (excluding high income),SSA,2008,1066496449692.34
Sub-Saharan Africa (excluding high income),SSA,2009,1021766938427.26
Sub-Saharan Africa (excluding high income),SSA,2010,1364845197859.64
Sub-Saharan Africa (excluding high income),SSA,2011,1536165615272.17
Sub-Saharan Africa (excluding high income),SSA,2012,1610975894781.15
Sub-Saharan Africa (excluding high income),SSA,2013,1697106498117.33
Sub-Saharan Africa (excluding high income),SSA,2014,1778862267354.27
Sub-Saharan Africa (excluding high income),SSA,2015,1604435981606.03
Sub-Saharan Africa (excluding high income),SSA,2016,1511168024853.82
Sub-Saharan Africa (IDA & IBRD countries),TSS,1960,30293454848.2105
Sub-Saharan Africa (IDA & IBRD countries),TSS,1961,31465076775.5305
Sub-Saharan Africa (IDA & IBRD countries),TSS,1962,34104849889.4766
Sub-Saharan Africa (IDA & IBRD countries),TSS,1963,39106436783.5605
Sub-Saharan Africa (IDA & IBRD countries),TSS,1964,38154669432.4731
Sub-Saharan Africa (IDA & IBRD countries),TSS,1965,42511265775.8869
Sub-Saharan Africa (IDA & IBRD countries),TSS,1966,45892007068.4288
Sub-Saharan Africa (IDA & IBRD countries),TSS,1967,45355789870.4112
Sub-Saharan Africa (IDA & IBRD countries),TSS,1968,48511689901.6278
Sub-Saharan Africa (IDA & IBRD countries),TSS,1969,55619101230.4241
Sub-Saharan Africa (IDA & IBRD countries),TSS,1970,65441663595.2527
Sub-Saharan Africa (IDA & IBRD countries),TSS,1971,66584540143.7838
Sub-Saharan Africa (IDA & IBRD countries),TSS,1972,75015704819.2867
Sub-Saharan Africa (IDA & IBRD countries),TSS,1973,95886132380.8826
Sub-Saharan Africa (IDA & IBRD countries),TSS,1974,125666113209.184
Sub-Saharan Africa (IDA & IBRD countries),TSS,1975,138201570744.764
Sub-Saharan Africa (IDA & IBRD countries),TSS,1976,150065750976.478
Sub-Saharan Africa (IDA & IBRD countries),TSS,1977,165419484974.18
Sub-Saharan Africa (IDA & IBRD countries),TSS,1978,182804718774.66
Sub-Saharan Africa (IDA & IBRD countries),TSS,1979,220049397934.685
Sub-Saharan Africa (IDA & IBRD countries),TSS,1980,276325613788.157
Sub-Saharan Africa (IDA & IBRD countries),TSS,1981,278746905466.921
Sub-Saharan Africa (IDA & IBRD countries),TSS,1982,260407279021.102
Sub-Saharan Africa (IDA & IBRD countries),TSS,1983,242438533416.831
Sub-Saharan Africa (IDA & IBRD countries),TSS,1984,230830117319.8
Sub-Saharan Africa (IDA & IBRD countries),TSS,1985,215111614796.825
Sub-Saharan Africa (IDA & IBRD countries),TSS,1986,238400378521.777
Sub-Saharan Africa (IDA & IBRD countries),TSS,1987,280930550942.236
Sub-Saharan Africa (IDA & IBRD countries),TSS,1988,295523690332.111
Sub-Saharan Africa (IDA & IBRD countries),TSS,1989,309182519793.757
Sub-Saharan Africa (IDA & IBRD countries),TSS,1990,309656772694.718
Sub-Saharan Africa (IDA & IBRD countries),TSS,1991,319139026333.246
Sub-Saharan Africa (IDA & IBRD countries),TSS,1992,313874505716.532
Sub-Saharan Africa (IDA & IBRD countries),TSS,1993,300038498591.01
Sub-Saharan Africa (IDA & IBRD countries),TSS,1994,292189333027.886
Sub-Saharan Africa (IDA & IBRD countries),TSS,1995,337411634256.534
Sub-Saharan Africa (IDA & IBRD countries),TSS,1996,348828092040.987
Sub-Saharan Africa (IDA & IBRD countries),TSS,1997,361006709281.608
Sub-Saharan Africa (IDA & IBRD countries),TSS,1998,340572456123.532
Sub-Saharan Africa (IDA & IBRD countries),TSS,1999,342916454500.386
Sub-Saharan Africa (IDA & IBRD countries),TSS,2000,367679644790.853
Sub-Saharan Africa (IDA & IBRD countries),TSS,2001,342345476693.071
Sub-Saharan Africa (IDA & IBRD countries),TSS,2002,366969503176.656
Sub-Saharan Africa (IDA & IBRD countries),TSS,2003,468505411662.939
Sub-Saharan Africa (IDA & IBRD countries),TSS,2004,583461060225.834
Sub-Saharan Africa (IDA & IBRD countries),TSS,2005,685226908393.033
Sub-Saharan Africa (IDA & IBRD countries),TSS,2006,802075288542.163
Sub-Saharan Africa (IDA & IBRD countries),TSS,2007,933327105483.534
Sub-Saharan Africa (IDA & IBRD countries),TSS,2008,1067466936503.72
Sub-Saharan Africa (IDA & IBRD countries),TSS,2009,1022616202357.64
Sub-Saharan Africa (IDA & IBRD countries),TSS,2010,1365815003522.17
Sub-Saharan Africa (IDA & IBRD countries),TSS,2011,1537231271076.8
Sub-Saharan Africa (IDA & IBRD countries),TSS,2012,1612110026187.15
Sub-Saharan Africa (IDA & IBRD countries),TSS,2013,1698517981177.86
Sub-Saharan Africa (IDA & IBRD countries),TSS,2014,1780285270973.27
Sub-Saharan Africa (IDA & IBRD countries),TSS,2015,1605874046218.37
Sub-Saharan Africa (IDA & IBRD countries),TSS,2016,1512596044161.42
Upper middle income,UMC,1960,217197228589.06
Upper middle income,UMC,1961,198161709253.157
Upper middle income,UMC,1962,208387681588.376
Upper middle income,UMC,1963,218097128148.794
Upper middle income,UMC,1964,246118229644.675
Upper middle income,UMC,1965,274661068385.749
Upper middle income,UMC,1966,301788034391.807
Upper middle income,UMC,1967,306048687590.864
Upper middle income,UMC,1968,322080862813.56
Upper middle income,UMC,1969,360346863732.29
Upper middle income,UMC,1970,394709749267.255
Upper middle income,UMC,1971,432717473893.993
Upper middle income,UMC,1972,494628928337.531
Upper middle income,UMC,1973,642136260560.19
Upper middle income,UMC,1974,822212508130.015
Upper middle income,UMC,1975,906907625571.622
Upper middle income,UMC,1976,984879011514.869
Upper middle income,UMC,1977,1099892763408.74
Upper middle income,UMC,1978,1175436105563.13
Upper middle income,UMC,1979,1426455337349
Upper middle income,UMC,1980,1630708204057.47
Upper middle income,UMC,1981,1773940105596.22
Upper middle income,UMC,1982,1749432551997.41
Upper middle income,UMC,1983,1724507334399.32
Upper middle income,UMC,1984,1770298964147.93
Upper middle income,UMC,1985,1866998100513.03
Upper middle income,UMC,1986,1949717163087.08
Upper middle income,UMC,1987,1947815210541.88
Upper middle income,UMC,1988,2143321393959.61
Upper middle income,UMC,1989,2330509907218.71
Upper middle income,UMC,1990,2667998768468.1
Upper middle income,UMC,1991,2945865006368.94
Upper middle income,UMC,1992,2871277482764.44
Upper middle income,UMC,1993,3115092888404.34
Upper middle income,UMC,1994,3394081761536.28
Upper middle income,UMC,1995,3790084357284.85
Upper middle income,UMC,1996,4119734461208.99
Upper middle income,UMC,1997,4389821145553.8
Upper middle income,UMC,1998,4336843745142.04
Upper middle income,UMC,1999,4105116372238.13
Upper middle income,UMC,2000,4516717359655
Upper middle income,UMC,2001,4570269255613.37
Upper middle income,UMC,2002,4585341852437.76
Upper middle income,UMC,2003,5167481933006.5
Upper middle income,UMC,2004,6213674550938.77
Upper middle income,UMC,2005,7480336164014.47
Upper middle income,UMC,2006,8894393230290.41
Upper middle income,UMC,2007,11065382151621.8
Upper middle income,UMC,2008,13528506574524.2
Upper middle income,UMC,2009,13027040456100
Upper middle income,UMC,2010,15792230570440.2
Upper middle income,UMC,2011,18897054524211
Upper middle income,UMC,2012,20194427120059.2
Upper middle income,UMC,2013,21498865852640
Upper middle income,UMC,2014,22212201918323.9
Upper middle income,UMC,2015,20772440074303.6
Upper middle income,UMC,2016,20623856301266.3
World,WLD,1960,1366678314500.11
World,WLD,1961,1421787954650.66
World,WLD,1962,1526955368819.35
World,WLD,1963,1643751761478.77
World,WLD,1964,1800795995209.43
World,WLD,1965,1961780296080.77
World,WLD,1966,2128450484917.02
World,WLD,1967,2264600480895.74
World,WLD,1968,2443223914097.19
World,WLD,1969,2690797713906.75
World,WLD,1970,2957799684034.88
World,WLD,1971,3266907090008.42
World,WLD,1972,3767673874129.39
World,WLD,1973,4591345929540.29
World,WLD,1974,5296031606150.48
World,WLD,1975,5897205371168.41
World,WLD,1976,6416473081055.61
World,WLD,1977,7257626963722.61
World,WLD,1978,8542924735220.41
World,WLD,1979,9925897437975.24
World,WLD,1980,11172203734232.9
World,WLD,1981,11464351513520.9
World,WLD,1982,11363646516060.8
World,WLD,1983,11623710624558.5
World,WLD,1984,12065068062766.6
World,WLD,1985,12689154578406.4
World,WLD,1986,15022583231149.5
World,WLD,1987,17091694967928.9
World,WLD,1988,19140813953244.6
World,WLD,1989,20092825106288.4
World,WLD,1990,22595007714784.7
World,WLD,1991,23927631710502.6
World,WLD,1992,25409951568921.6
World,WLD,1993,25859044482204.5
World,WLD,1994,27767511728269.1
World,WLD,1995,30872586998056.7
World,WLD,1996,31552679853240.2
World,WLD,1997,31435387611565.4
World,WLD,1998,31338780339102.7
World,WLD,1999,32510834041730.3
World,WLD,2000,33566568243507
World,WLD,2001,33354548715888.5
World,WLD,2002,34635964364193.1
World,WLD,2003,38894058718266
World,WLD,2004,43804823746956.6
World,WLD,2005,47428894542015.9
World,WLD,2006,51363239608528.7
World,WLD,2007,57858970551966.6
World,WLD,2008,63461809858683.9
World,WLD,2009,60168346976208.9
World,WLD,2010,65954532001568.7
World,WLD,2011,73279862292629
World,WLD,2012,74889946508917.8
World,WLD,2013,76990857251851
World,WLD,2014,79049230590610.9
World,WLD,2015,74757745150689.1
World,WLD,2016,75845109381590.5
Afghanistan,AFG,1960,537777811.111111
Afghanistan,AFG,1961,548888895.555556
Afghanistan,AFG,1962,546666677.777778
Afghanistan,AFG,1963,751111191.111111
Afghanistan,AFG,1964,800000044.444444
Afghanistan,AFG,1965,1006666637.77778
Afghanistan,AFG,1966,1399999966.66667
Afghanistan,AFG,1967,1673333417.77778
Afghanistan,AFG,1968,1373333366.66667
Afghanistan,AFG,1969,1408888922.22222
Afghanistan,AFG,1970,1748886595.55556
Afghanistan,AFG,1971,1831108971.11111
Afghanistan,AFG,1972,1595555475.55556
Afghanistan,AFG,1973,1733333264.44444
Afghanistan,AFG,1974,2155555497.77778
Afghanistan,AFG,1975,2366666615.55556
Afghanistan,AFG,1976,2555555566.66667
Afghanistan,AFG,1977,2953333417.77778
Afghanistan,AFG,1978,3300000108.88889
Afghanistan,AFG,1979,3697940409.61098
Afghanistan,AFG,1980,3641723321.99546
Afghanistan,AFG,1981,3478787909.09091
Afghanistan,AFG,2001,2461665937.89386
Afghanistan,AFG,2002,4128820723.04713
Afghanistan,AFG,2003,4583644246.48061
Afghanistan,AFG,2004,5285465685.86423
Afghanistan,AFG,2005,6275073571.54659
Afghanistan,AFG,2006,7057598406.61553
Afghanistan,AFG,2007,9843842455.48323
Afghanistan,AFG,2008,10190529882.4878
Afghanistan,AFG,2009,12486943505.7381
Afghanistan,AFG,2010,15936800636.2487
Afghanistan,AFG,2011,17930239399.8149
Afghanistan,AFG,2012,20536542736.7297
Afghanistan,AFG,2013,20046334303.9661
Afghanistan,AFG,2014,20050189881.6659
Afghanistan,AFG,2015,19215562179.0117
Afghanistan,AFG,2016,19469022207.6852
Albania,ALB,1984,1924242453.00793
Albania,ALB,1985,1965384586.2409
Albania,ALB,1986,2173750012.5
Albania,ALB,1987,2156624900
Albania,ALB,1988,2126000000
Albania,ALB,1989,2335124987.5
Albania,ALB,1990,2101624962.5
Albania,ALB,1991,1139166645.83333
Albania,ALB,1992,709452583.880319
Albania,ALB,1993,1228071037.84446
Albania,ALB,1994,1985673798.10258
Albania,ALB,1995,2424499009.14264
Albania,ALB,1996,3314898291.75235
Albania,ALB,1997,2359903108.38446
Albania,ALB,1998,2707123772.16195
Albania,ALB,1999,3414760915.27878
Albania,ALB,2000,3632043907.97733
Albania,ALB,2001,4060758804.12084
Albania,ALB,2002,4435078647.74817
Albania,ALB,2003,5746945912.58082
Albania,ALB,2004,7314865175.6199
Albania,ALB,2005,8158548716.68554
Albania,ALB,2006,8992642348.7871
Albania,ALB,2007,10701011896.7708
Albania,ALB,2008,12881352687.7773
Albania,ALB,2009,12044212903.8168
Albania,ALB,2010,11926953258.916
Albania,ALB,2011,12890867538.5302
Albania,ALB,2012,12319784787.2987
Albania,ALB,2013,12776277515.48
Albania,ALB,2014,13228244357.1813
Albania,ALB,2015,11335264966.561
Albania,ALB,2016,11863865978.0942
Algeria,DZA,1960,2723648551.75208
Algeria,DZA,1961,2434776645.73628
Algeria,DZA,1962,2001468867.73344
Algeria,DZA,1963,2703014867.32834
Algeria,DZA,1964,2909351792.58659
Algeria,DZA,1965,3136258896.9233
Algeria,DZA,1966,3039834558.74906
Algeria,DZA,1967,3370843065.76735
Algeria,DZA,1968,3852115816.97758
Algeria,DZA,1969,4257218772.15369
Algeria,DZA,1970,4863487492.65763
Algeria,DZA,1971,5077222366.97472
Algeria,DZA,1972,6761786386.54713
Algeria,DZA,1973,8715105930.49101
Algeria,DZA,1974,13209713643.3219
Algeria,DZA,1975,15557934268.4965
Algeria,DZA,1976,17728347374.994
Algeria,DZA,1977,20971901273.271
Algeria,DZA,1978,26364491313.4471
Algeria,DZA,1979,33243422157.6311
Algeria,DZA,1980,42345277342.0195
Algeria,DZA,1981,44348672667.8715
Algeria,DZA,1982,45207088715.6483
Algeria,DZA,1983,48801369800.3675
Algeria,DZA,1984,53698278905.9678
Algeria,DZA,1985,57937868670.1937
Algeria,DZA,1986,63696301892.8116
Algeria,DZA,1987,66742267773.1959
Algeria,DZA,1988,59089067187.3943
Algeria,DZA,1989,55631489801.5508
Algeria,DZA,1990,62045099642.7774
Algeria,DZA,1991,45715367087.1001
Algeria,DZA,1992,48003298223.1178
Algeria,DZA,1993,49946455210.966
Algeria,DZA,1994,42542571305.5136
Algeria,DZA,1995,41764052457.8814
Algeria,DZA,1996,46941496779.8499
Algeria,DZA,1997,48177862501.9495
Algeria,DZA,1998,48187747528.899
Algeria,DZA,1999,48640574566.6476
Algeria,DZA,2000,54790245600.5846
Algeria,DZA,2001,54744714396.1666
Algeria,DZA,2002,56760288973.6703
Algeria,DZA,2003,67863829880.4832
Algeria,DZA,2004,85324998813.604
Algeria,DZA,2005,103198228458.588
Algeria,DZA,2006,117027304746.54
Algeria,DZA,2007,134977087734.008
Algeria,DZA,2008,171000691877.714
Algeria,DZA,2009,137211039898.193
Algeria,DZA,2010,161207268655.392
Algeria,DZA,2011,200019057307.655
Algeria,DZA,2012,209058991952.125
Algeria,DZA,2013,209755003250.664
Algeria,DZA,2014,213810022462.428
Algeria,DZA,2015,165874330876.321
Algeria,DZA,2016,159049096745.249
American Samoa,ASM,2002,514000000
American Samoa,ASM,2003,527000000
American Samoa,ASM,2004,512000000
American Samoa,ASM,2005,503000000
American Samoa,ASM,2006,496000000
American Samoa,ASM,2007,520000000
American Samoa,ASM,2008,563000000
American Samoa,ASM,2009,678000000
American Samoa,ASM,2010,576000000
American Samoa,ASM,2011,574000000
American Samoa,ASM,2012,644000000
American Samoa,ASM,2013,641000000
American Samoa,ASM,2014,643000000
American Samoa,ASM,2015,659000000
American Samoa,ASM,2016,658000000
Andorra,AND,1970,78619206.0850963
Andorra,AND,1971,89409820.3592814
Andorra,AND,1972,113408231.944085
Andorra,AND,1973,150820102.798401
Andorra,AND,1974,186558696.279204
Andorra,AND,1975,220127246.376812
Andorra,AND,1976,227281024.620741
Andorra,AND,1977,254020153.340635
Andorra,AND,1978,308008897.569444
Andorra,AND,1979,411578334.159643
Andorra,AND,1980,446416105.825017
Andorra,AND,1981,388958731.302938
Andorra,AND,1982,375895956.383462
Andorra,AND,1983,327861832.946636
Andorra,AND,1984,330070689.298282
Andorra,AND,1985,346737964.774951
Andorra,AND,1986,482000594.03588
Andorra,AND,1987,611316399.407088
Andorra,AND,1988,721425939.15155
Andorra,AND,1989,795449332.396346
Andorra,AND,1990,1029048481.88051
Andorra,AND,1991,1106928582.86629
Andorra,AND,1992,1210013651.87713
Andorra,AND,1993,1007025755.00065
Andorra,AND,1994,1017549124.33238
Andorra,AND,1995,1178738991.19295
Andorra,AND,1996,1223945356.62682
Andorra,AND,1997,1180597272.72727
Andorra,AND,1998,1211932397.81713
Andorra,AND,1999,1239876305.13531
Andorra,AND,2000,1434429703.33518
Andorra,AND,2001,1496912751.67785
Andorra,AND,2002,1733116883.11688
Andorra,AND,2003,2398645598.19413
Andorra,AND,2004,2935659299.72684
Andorra,AND,2005,3255789080.96008
Andorra,AND,2006,3543256805.92147
Andorra,AND,2007,4016972351.49192
Andorra,AND,2008,4007353156.58415
Andorra,AND,2009,3660530702.97305
Andorra,AND,2010,3355695364.23841
Andorra,AND,2011,3442062830.13622
Andorra,AND,2012,3164615186.94591
Andorra,AND,2013,3281585236.32501
Andorra,AND,2014,3350736367.25488
Andorra,AND,2015,2811489408.89431
Andorra,AND,2016,2858517699.11504
Angola,AGO,1985,6684491978.60963
Angola,AGO,1986,6684491978.60963
Angola,AGO,1987,6684491978.60963
Angola,AGO,1988,6684491978.60963
Angola,AGO,1989,10026737967.9144
Angola,AGO,1990,10026737967.9144
Angola,AGO,1991,12118610904.2251
Angola,AGO,1992,5684291718.77106
Angola,AGO,1993,5278182970.79618
Angola,AGO,1994,4059352153.05368
Angola,AGO,1995,5039552482.42778
Angola,AGO,1996,7526446605.51712
Angola,AGO,1997,7648377412.83277
Angola,AGO,1998,6445041824.66621
Angola,AGO,1999,6152922942.98032
Angola,AGO,2000,9129594818.60749
Angola,AGO,2001,8936063723.20121
Angola,AGO,2002,12497346669.6684
Angola,AGO,2003,14188949190.618
Angola,AGO,2004,19640848728.8937
Angola,AGO,2005,28233712830.9035
Angola,AGO,2006,41789478661.3096
Angola,AGO,2007,60448921272.2326
Angola,AGO,2008,84178032716.0971
Angola,AGO,2009,75492384801.3695
Angola,AGO,2010,82470913120.7314
Angola,AGO,2011,104115923082.737
Angola,AGO,2012,115398371427.673
Angola,AGO,2013,124912063308.202
Angola,AGO,2014,126776874216.703
Angola,AGO,2015,102962245246.708
Angola,AGO,2016,95335111741.2025
Antigua and Barbuda,ATG,1977,77496740.7407407
Antigua and Barbuda,ATG,1978,87879333.3333333
Antigua and Barbuda,ATG,1979,109079962.962963
Antigua and Barbuda,ATG,1980,131431037.037037
Antigua and Barbuda,ATG,1981,147841740.740741
Antigua and Barbuda,ATG,1982,164369296.296296
Antigua and Barbuda,ATG,1983,182144111.111111
Antigua and Barbuda,ATG,1984,208372851.851852
Antigua and Barbuda,ATG,1985,240923925.925926
Antigua and Barbuda,ATG,1986,290440148.148148
Antigua and Barbuda,ATG,1987,337174851.851852
Antigua and Barbuda,ATG,1988,398637740.740741
Antigua and Barbuda,ATG,1989,438794777.777778
Antigua and Barbuda,ATG,1990,459469074.074074
Antigua and Barbuda,ATG,1991,481706333.333333
Antigua and Barbuda,ATG,1992,499281148.148148
Antigua and Barbuda,ATG,1993,535172777.777778
Antigua and Barbuda,ATG,1994,589429592.592593
Antigua and Barbuda,ATG,1995,577280740.740741
Antigua and Barbuda,ATG,1996,633730629.62963
Antigua and Barbuda,ATG,1997,680617111.111111
Antigua and Barbuda,ATG,1998,727860592.592593
Antigua and Barbuda,ATG,1999,766198925.925926
Antigua and Barbuda,ATG,2000,830158768.888889
Antigua and Barbuda,ATG,2001,800740257.407407
Antigua and Barbuda,ATG,2002,814615323.703704
Antigua and Barbuda,ATG,2003,855643099.62963
Antigua and Barbuda,ATG,2004,919577142.592592
Antigua and Barbuda,ATG,2005,1022191294.07407
Antigua and Barbuda,ATG,2006,1157005441.48148
Antigua and Barbuda,ATG,2007,1311401318.88889
Antigua and Barbuda,ATG,2008,1368431037.03704
Antigua and Barbuda,ATG,2009,1224253000
Antigua and Barbuda,ATG,2010,1152469074.07407
Antigua and Barbuda,ATG,2011,1142042925.92593
Antigua and Barbuda,ATG,2012,1211411703.7037
Antigua and Barbuda,ATG,2013,1192925407.40741
Antigua and Barbuda,ATG,2014,1280133333.33333
Antigua and Barbuda,ATG,2015,1364863037.03704
Antigua and Barbuda,ATG,2016,1460144703.7037
Argentina,ARG,1962,24450604877.6081
Argentina,ARG,1963,18272123664.4715
Argentina,ARG,1964,25605249381.7597
Argentina,ARG,1965,28344705966.6389
Argentina,ARG,1966,28630474727.9023
Argentina,ARG,1967,24256667553.2569
Argentina,ARG,1968,26436857247.4982
Argentina,ARG,1969,31256284543.6155
Argentina,ARG,1970,31584210365.5447
Argentina,ARG,1971,33293199095.4881
Argentina,ARG,1972,34733000536.2862
Argentina,ARG,1973,52544000116.9037
Argentina,ARG,1974,72436777342.4554
Argentina,ARG,1975,52438647921.9226
Argentina,ARG,1976,51169499890.7722
Argentina,ARG,1977,56781000100.9448
Argentina,ARG,1978,58082870156.2634
Argentina,ARG,1979,69252328953.3789
Argentina,ARG,1980,76961923741.9478
Argentina,ARG,1981,78676842366.4213
Argentina,ARG,1982,84307486836.724
Argentina,ARG,1983,103979106777.911
Argentina,ARG,1984,79092001998.032
Argentina,ARG,1985,88416668900.2596
Argentina,ARG,1986,110934442762.694
Argentina,ARG,1987,111106191358.197
Argentina,ARG,1988,126206817196.091
Argentina,ARG,1989,76636898036.4712
Argentina,ARG,1990,141352368714.691
Argentina,ARG,1991,189719984268.485
Argentina,ARG,1992,228788617201.696
Argentina,ARG,1993,236741715015.015
Argentina,ARG,1994,257440000000
Argentina,ARG,1995,258031750000
Argentina,ARG,1996,272149750000
Argentina,ARG,1997,292859000000
Argentina,ARG,1998,298948250000
Argentina,ARG,1999,283523000000
Argentina,ARG,2000,284203750000
Argentina,ARG,2001,268696750000
Argentina,ARG,2002,97724004251.8602
Argentina,ARG,2003,127586973492.177
Argentina,ARG,2004,164657930452.787
Argentina,ARG,2005,198737095012.282
Argentina,ARG,2006,232557260817.308
Argentina,ARG,2007,287530508430.568
Argentina,ARG,2008,361558037110.419
Argentina,ARG,2009,332976484577.619
Argentina,ARG,2010,423627422092.49
Argentina,ARG,2011,530163281574.658
Argentina,ARG,2012,545982375701.128
Argentina,ARG,2013,552025140252.246
Argentina,ARG,2014,526319673731.638
Argentina,ARG,2015,584711485367.267
Argentina,ARG,2016,545476103427.247
Armenia,ARM,1990,2256838858.42714
Armenia,ARM,1991,2068526521.90299
Armenia,ARM,1992,1272577456.12712
Armenia,ARM,1993,1201313201.01272
Armenia,ARM,1994,1315158670.28285
Armenia,ARM,1995,1468317350.06841
Armenia,ARM,1996,1596968913.27897
Armenia,ARM,1997,1639492424.36472
Armenia,ARM,1998,1893726437.26462
Armenia,ARM,1999,1845482181.44801
Armenia,ARM,2000,1911563665.39006
Armenia,ARM,2001,2118467913.37873
Armenia,ARM,2002,2376335048.39976
Armenia,ARM,2003,2807061008.69084
Armenia,ARM,2004,3576615240.41616
Armenia,ARM,2005,4900469950.09033
Armenia,ARM,2006,6384451606.1421
Armenia,ARM,2007,9206301700.39619
Armenia,ARM,2008,11662040713.8753
Armenia,ARM,2009,8647936747.98704
Armenia,ARM,2010,9260284937.79782
Armenia,ARM,2011,10142111334.4961
Armenia,ARM,2012,10619320048.5857
Armenia,ARM,2013,11121465767.4067
Armenia,ARM,2014,11609512939.7543
Armenia,ARM,2015,10553337672.9872
Armenia,ARM,2016,10572298341.5618
Aruba,ABW,1994,1330167597.76536
Aruba,ABW,1995,1320670391.06145
Aruba,ABW,1996,1379888268.15642
Aruba,ABW,1997,1531843575.41899
Aruba,ABW,1998,1665363128.49162
Aruba,ABW,1999,1722798882.68156
Aruba,ABW,2000,1873452513.96648
Aruba,ABW,2001,1920262569.8324
Aruba,ABW,2002,1941094972.06704
Aruba,ABW,2003,2021301675.97765
Aruba,ABW,2004,2228279329.60894
Aruba,ABW,2005,2331005586.59218
Aruba,ABW,2006,2421474860.3352
Aruba,ABW,2007,2623726256.98324
Aruba,ABW,2008,2791960893.85475
Aruba,ABW,2009,2498932960.89385
Aruba,ABW,2010,2467703910.61453
Aruba,ABW,2011,2584463687.15084
Australia,AUS,1960,18593347519.3191
Australia,AUS,1961,19666256019.7111
Australia,AUS,1962,19911524246.8362
Australia,AUS,1963,21527606674.8796
Australia,AUS,1964,23787658192.4068
Australia,AUS,1965,25962593795.4978
Australia,AUS,1966,27288610146.713
Australia,AUS,1967,30421099787.2102
Australia,AUS,1968,32687870982.1929
Australia,AUS,1969,36659200358.3828
Australia,AUS,1970,41304737372.6061
Australia,AUS,1971,45183111210.6619
Australia,AUS,1972,52003504672.8972
Australia,AUS,1973,63782190903.2671
Australia,AUS,1974,88906411201.1791
Australia,AUS,1975,97226546497.3372
Australia,AUS,1976,104974158578.092
Australia,AUS,1977,110266116081.67
Australia,AUS,1978,118400631626.438
Australia,AUS,1979,134793820288.538
Australia,AUS,1980,149887465181.059
Australia,AUS,1981,176804829908.278
Australia,AUS,1982,193954540439.148
Australia,AUS,1983,177176415535.798
Australia,AUS,1984,193503894222.061
Australia,AUS,1985,180470967247.066
Australia,AUS,1986,182281757134.863
Australia,AUS,1987,189375992588.671
Australia,AUS,1988,236135768335.274
Australia,AUS,1989,299941372852.374
Australia,AUS,1990,311425933051.174
Australia,AUS,1991,326068597441.331
Australia,AUS,1992,325692532492.502
Australia,AUS,1993,312372821810.006
Australia,AUS,1994,323216879972.328
Australia,AUS,1995,368391743391.743
Australia,AUS,1996,401819423368.74
Australia,AUS,1997,436097980904.68
Australia,AUS,1998,399778878111.646
Australia,AUS,1999,389146509587.668
Australia,AUS,2000,415446209885.072
Australia,AUS,2001,378899860470.108
Australia,AUS,2002,394635830891.586
Australia,AUS,2003,466853232382.062
Australia,AUS,2004,613329776639.636
Australia,AUS,2005,693764095624.718
Australia,AUS,2006,747572626534.891
Australia,AUS,2007,853764622752.61
Australia,AUS,2008,1055334825425.25
Australia,AUS,2009,927168310999.853
Australia,AUS,2010,1142876772659.21
Australia,AUS,2011,1390557034407.97
Australia,AUS,2012,1538194473087.23
Australia,AUS,2013,1567178619062.28
Australia,AUS,2014,1459597906912.7
Australia,AUS,2015,1345383143356.35
Australia,AUS,2016,1204616439828.41
Austria,AUT,1960,6592693841.18495
Austria,AUT,1961,7311749633.36229
Austria,AUT,1962,7756110210.11966
Austria,AUT,1963,8374175257.73075
Austria,AUT,1964,9169983885.71185
Austria,AUT,1965,9994070615.85997
Austria,AUT,1966,10887682273.1014
Austria,AUT,1967,11579431668.9165
Austria,AUT,1968,12440625312.8685
Austria,AUT,1969,13582798556.2404
Austria,AUT,1970,15373005768.7219
Austria,AUT,1971,17858485956.6031
Austria,AUT,1972,22059612417.4058
Austria,AUT,1973,29515467987.912
Austria,AUT,1974,35189299985.2768
Austria,AUT,1975,40059206763.056
Austria,AUT,1976,42959976068.1138
Austria,AUT,1977,51545759220.7143
Austria,AUT,1978,62052258694.2102
Austria,AUT,1979,73937296654.6577
Austria,AUT,1980,82058912465.4329
Austria,AUT,1981,71034228097.4598
Austria,AUT,1982,71275287327.5793
Austria,AUT,1983,72121016623.2572
Austria,AUT,1984,67985345161.9558
Austria,AUT,1985,69386774474.5943
Austria,AUT,1986,99036165209.5539
Austria,AUT,1987,124168442860.253
Austria,AUT,1988,133339397080.129
Austria,AUT,1989,133105805928.237
Austria,AUT,1990,166463386663.439
Austria,AUT,1991,173794177725.398
Austria,AUT,1992,195078126346.106
Austria,AUT,1993,190379720927.481
Austria,AUT,1994,203535242741.838
Austria,AUT,1995,241038283062.645
Austria,AUT,1996,237250948791.266
Austria,AUT,1997,212790348404.555
Austria,AUT,1998,218259904401.956
Austria,AUT,1999,217185787342.851
Austria,AUT,2000,196799778883.361
Austria,AUT,2001,197337879194.631
Austria,AUT,2002,213377771503.858
Austria,AUT,2003,261695778781.038
Austria,AUT,2004,300904221504.842
Austria,AUT,2005,315974418604.651
Austria,AUT,2006,335998557270.104
Austria,AUT,2007,388691445387.353
Austria,AUT,2008,430294287388.311
Austria,A
gitextract_1289dhnl/
├── .dockerignore
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug.yml
│ │ └── feature_request.yml
│ └── workflows/
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── .pre-commit-config.yaml
├── CITATION.cff
├── Dockerfile
├── LICENSE.txt
├── README.md
├── chat.yml
├── config/
│ ├── chat-conversation.yml
│ └── chat-vectorstore-qa.yml
├── docker-compose.yml
├── docs/
│ ├── docs/
│ │ ├── ChatConf.md
│ │ ├── ChatEndpoint.md
│ │ ├── ChatRouter.md
│ │ ├── Llm.md
│ │ ├── assets/
│ │ │ └── custom.css
│ │ ├── configure-conversation.md
│ │ ├── configure-documents-qa.md
│ │ ├── development.md
│ │ ├── index.md
│ │ ├── use-docker.md
│ │ └── use-pip.md
│ ├── includes/
│ │ └── abbreviations.md
│ └── mkdocs.yml
├── documents/
│ └── gdp.csv
├── frontend/
│ ├── .gitignore
│ ├── README.md
│ ├── astro.config.mjs
│ ├── package.json
│ ├── src/
│ │ ├── components/
│ │ │ ├── admin.tsx
│ │ │ ├── chat.tsx
│ │ │ └── nanostores.ts
│ │ ├── env.d.ts
│ │ ├── layouts/
│ │ │ ├── Layout.astro
│ │ │ └── Nav.tsx
│ │ └── pages/
│ │ ├── admin.astro
│ │ └── index.astro
│ ├── tailwind.config.mjs
│ └── tsconfig.json
├── pyproject.toml
├── scripts/
│ ├── deploy.sh
│ ├── download.sh
│ ├── init.py
│ ├── langchain.ipynb
│ ├── main.py
│ ├── qdrant_config.yml
│ ├── requirements.txt
│ └── start.sh
├── src/
│ └── libre_chat/
│ ├── __init__.py
│ ├── __main__.py
│ ├── conf.py
│ ├── endpoint.py
│ ├── llm.py
│ ├── py.typed
│ ├── router.py
│ ├── static/
│ │ └── web-worker.js
│ ├── ui.py
│ ├── utils.py
│ ├── vectorstore.py
│ └── webapp/
│ ├── _astro/
│ │ ├── Nav.FPLT-AC_.js
│ │ ├── admin.e50kLjN3.css
│ │ ├── admin.uwsUQjhr.js
│ │ ├── chat.mnOtRnw4.js
│ │ ├── client.XqyIkt4q.js
│ │ ├── nanostores.RVhpkXze.js
│ │ └── web.zg9RI5L8.js
│ ├── admin/
│ │ └── index.html
│ └── index.html
└── tests/
├── __init__.py
├── config/
│ └── additional-prop.yml
├── test_api.py
├── test_api_qa.py
├── test_cli.py
├── test_llm.py
└── test_utils.py
SYMBOL INDEX (275 symbols across 24 files)
FILE: frontend/src/components/admin.tsx
function AdminUi (line 4) | function AdminUi() {
FILE: frontend/src/components/chat.tsx
function Chat (line 8) | function Chat() {
FILE: frontend/src/components/nanostores.ts
type ChatConfig (line 3) | interface ChatConfig {
function setConfig (line 24) | function setConfig(chatConfig: ChatConfig) {
FILE: frontend/src/layouts/Nav.tsx
function Nav (line 6) | function Nav() {
FILE: src/libre_chat/__main__.py
function start (line 19) | def start(
function build (line 48) | def build(
function version (line 78) | def version() -> None:
FILE: src/libre_chat/conf.py
class BaseConf (line 12) | class BaseConf(BaseSettings):
class SettingsInfo (line 18) | class SettingsInfo(BaseConf):
class SettingsVector (line 40) | class SettingsVector(BaseConf):
class SettingsLlm (line 57) | class SettingsLlm(BaseConf):
class SettingsAuth (line 68) | class SettingsAuth(BaseConf):
class ChatConf (line 80) | class ChatConf(BaseConf):
function parse_conf (line 92) | def parse_conf(path: str = default_conf.conf_path) -> ChatConf:
FILE: src/libre_chat/endpoint.py
class ChatEndpoint (line 19) | class ChatEndpoint(FastAPI):
method __init__ (line 24) | def __init__(
FILE: src/libre_chat/llm.py
class Llm (line 22) | class Llm:
method __init__ (line 27) | def __init__(
method download_data (line 95) | def download_data(self) -> None:
method has_vectorstore (line 110) | def has_vectorstore(self) -> bool:
method get_vectorstore (line 114) | def get_vectorstore(self) -> str:
method get_llm (line 118) | def get_llm(self, config: Optional[Dict[str, Any]] = None) -> LlamaCpp:
method setup_dbqa (line 145) | def setup_dbqa(self) -> None:
method query (line 172) | def query(
method aquery (line 237) | async def aquery(
FILE: src/libre_chat/router.py
class PromptResponse (line 35) | class PromptResponse:
class ChatRouter (line 40) | class ChatRouter(APIRouter):
method __init__ (line 45) | def __init__(
class StreamWebsocketCallback (line 253) | class StreamWebsocketCallback(AsyncCallbackHandler):
method __init__ (line 257) | def __init__(
method on_llm_new_token (line 265) | async def on_llm_new_token(self, token: str, **kwargs: Any) -> None:
FILE: src/libre_chat/static/web-worker.js
constant CACHE_NAME (line 3) | const CACHE_NAME = 'libre-chat-assets';
FILE: src/libre_chat/ui.py
function gradio_app (line 27) | def gradio_app(llm: Llm) -> Any:
class StreamGradioCallback (line 240) | class StreamGradioCallback(BaseCallbackHandler):
method __init__ (line 243) | def __init__(self, q: "Queue[Any]"):
method on_llm_new_token (line 246) | def on_llm_new_token(self, token: str, **kwargs: Any) -> None:
method on_llm_end (line 249) | def on_llm_end(self, *args: Any, **kwargs: Any) -> bool:
FILE: src/libre_chat/utils.py
class ChatResponse (line 31) | class ChatResponse(BaseModel):
method sender_must_be_bot_or_you (line 40) | def sender_must_be_bot_or_you(cls, v: str) -> str: # noqa
method validate_message_type (line 46) | def validate_message_type(cls, v: str) -> str: # noqa
class Prompt (line 55) | class Prompt:
function download_file (line 66) | def download_file(url: str, path: str) -> None:
function parallel_download (line 112) | def parallel_download(files_list: List[Dict[str, Optional[str]]], worker...
FILE: src/libre_chat/vectorstore.py
function build_vectorstore (line 31) | def build_vectorstore(
FILE: src/libre_chat/webapp/_astro/Nav.FPLT-AC_.js
function R (line 1) | function R(){const a=U(z);y(async()=>{const r=await(await fetch(`${G}/co...
FILE: src/libre_chat/webapp/_astro/admin.uwsUQjhr.js
function o (line 1) | function o(){return(()=>{var t=e(a);return t.style.setProperty("flex-gro...
FILE: src/libre_chat/webapp/_astro/chat.mnOtRnw4.js
function St (line 1) | function St(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:nul...
function gn (line 1) | function gn(c){de=c}
function H (line 1) | function H(c,e){if(e){if(dn.test(c))return c.replace(Wn,en)}else if(mn.t...
function Yn (line 1) | function Yn(c){return c.replace(Zn,(e,n)=>(n=n.toLowerCase(),n==="colon"...
function T (line 1) | function T(c,e){let n=typeof c=="string"?c:c.source;e=e||"";const t={rep...
function tn (line 1) | function tn(c){try{c=encodeURI(c).replace(/%25/g,"%")}catch{return null}...
function nn (line 1) | function nn(c,e){const n=c.replace(/\|/g,(r,i,l)=>{let a=!1,g=i;for(;--g...
function je (line 1) | function je(c,e,n){const t=c.length;if(t===0)return"";let s=0;for(;s<t;)...
function Xn (line 1) | function Xn(c,e){if(c.indexOf(e[1])===-1)return-1;let n=0;for(let t=0;t<...
function sn (line 1) | function sn(c,e,n,t){const s=e.href,r=e.title?H(e.title):null,i=c[1].rep...
function Qn (line 1) | function Qn(c,e){const n=c.match(/^(\s+)(?:```)/);if(n===null)return e;c...
class tt (line 3) | class tt{options;rules;lexer;constructor(e){this.options=e||de}space(e){...
method constructor (line 3) | constructor(e){this.options=e||de}
method space (line 3) | space(e){const n=this.rules.block.newline.exec(e);if(n&&n[0].length>0)...
method code (line 3) | code(e){const n=this.rules.block.code.exec(e);if(n){const t=n[0].repla...
method fences (line 4) | fences(e){const n=this.rules.block.fences.exec(e);if(n){const t=n[0],s...
method heading (line 4) | heading(e){const n=this.rules.block.heading.exec(e);if(n){let t=n[2].t...
method hr (line 4) | hr(e){const n=this.rules.block.hr.exec(e);if(n)return{type:"hr",raw:n[...
method blockquote (line 4) | blockquote(e){const n=this.rules.block.blockquote.exec(e);if(n){const ...
method list (line 5) | list(e){let n=this.rules.block.list.exec(e);if(n){let t=n[1].trim();co...
method html (line 12) | html(e){const n=this.rules.block.html.exec(e);if(n)return{type:"html",...
method def (line 12) | def(e){const n=this.rules.block.def.exec(e);if(n){const t=n[1].toLower...
method table (line 12) | table(e){const n=this.rules.block.table.exec(e);if(!n||!/[:|]/.test(n[...
method lheading (line 13) | lheading(e){const n=this.rules.block.lheading.exec(e);if(n)return{type...
method paragraph (line 13) | paragraph(e){const n=this.rules.block.paragraph.exec(e);if(n){const t=...
method text (line 14) | text(e){const n=this.rules.block.text.exec(e);if(n)return{type:"text",...
method escape (line 14) | escape(e){const n=this.rules.inline.escape.exec(e);if(n)return{type:"e...
method tag (line 14) | tag(e){const n=this.rules.inline.tag.exec(e);if(n)return!this.lexer.st...
method link (line 14) | link(e){const n=this.rules.inline.link.exec(e);if(n){const t=n[2].trim...
method reflink (line 14) | reflink(e,n){let t;if((t=this.rules.inline.reflink.exec(e))||(t=this.r...
method emStrong (line 14) | emStrong(e,n,t=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!...
method codespan (line 14) | codespan(e){const n=this.rules.inline.code.exec(e);if(n){let t=n[2].re...
method br (line 14) | br(e){const n=this.rules.inline.br.exec(e);if(n)return{type:"br",raw:n...
method del (line 14) | del(e){const n=this.rules.inline.del.exec(e);if(n)return{type:"del",ra...
method autolink (line 14) | autolink(e){const n=this.rules.inline.autolink.exec(e);if(n){let t,s;r...
method url (line 14) | url(e){let n;if(n=this.rules.inline.url.exec(e)){let t,s;if(n[2]==="@"...
method inlineText (line 14) | inlineText(e){const n=this.rules.inline.text.exec(e);if(n){let t;retur...
class K (line 15) | class K{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.t...
method constructor (line 15) | constructor(e){this.tokens=[],this.tokens.links=Object.create(null),th...
method rules (line 15) | static get rules(){return{block:Xe,inline:Ne}}
method lex (line 15) | static lex(e,n){return new K(n).lex(e)}
method lexInline (line 15) | static lexInline(e,n){return new K(n).inlineTokens(e)}
method lex (line 15) | lex(e){e=e.replace(/\r\n|\r/g,`
method blockTokens (line 16) | blockTokens(e,n=[]){this.options.pedantic?e=e.replace(/\t/g," ").re...
method inline (line 25) | inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}
method inlineTokens (line 25) | inlineTokens(e,n=[]){let t,s,r,i=e,l,a,g;if(this.tokens.links){const p...
class it (line 25) | class it{options;constructor(e){this.options=e||de}code(e,n,t){const s=(...
method constructor (line 25) | constructor(e){this.options=e||de}
method code (line 25) | code(e,n,t){const s=(n||"").match(/^\S*/)?.[0];return e=e.replace(/\n$...
method blockquote (line 28) | blockquote(e){return`<blockquote>
method html (line 30) | html(e,n){return e}
method heading (line 30) | heading(e,n,t){return`<h${n}>${e}</h${n}>
method hr (line 31) | hr(){return`<hr>
method list (line 32) | list(e,n,t){const s=n?"ol":"ul",r=n&&t!==1?' start="'+t+'"':"";return"...
method listitem (line 34) | listitem(e,n,t){return`<li>${e}</li>
method checkbox (line 35) | checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="ch...
method paragraph (line 35) | paragraph(e){return`<p>${e}</p>
method table (line 36) | table(e,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
method tablerow (line 40) | tablerow(e){return`<tr>
method tablecell (line 42) | tablecell(e,n){const t=n.header?"th":"td";return(n.align?`<${t} align=...
method strong (line 43) | strong(e){return`<strong>${e}</strong>`}
method em (line 43) | em(e){return`<em>${e}</em>`}
method codespan (line 43) | codespan(e){return`<code>${e}</code>`}
method br (line 43) | br(){return"<br>"}
method del (line 43) | del(e){return`<del>${e}</del>`}
method link (line 43) | link(e,n,t){const s=tn(e);if(s===null)return t;e=s;let r='<a href="'+e...
method image (line 43) | image(e,n,t){const s=tn(e);if(s===null)return t;e=s;let r=`<img src="$...
method text (line 43) | text(e){return e}
class Dt (line 43) | class Dt{strong(e){return e}em(e){return e}codespan(e){return e}del(e){r...
method strong (line 43) | strong(e){return e}
method em (line 43) | em(e){return e}
method codespan (line 43) | codespan(e){return e}
method del (line 43) | del(e){return e}
method html (line 43) | html(e){return e}
method text (line 43) | text(e){return e}
method link (line 43) | link(e,n,t){return""+t}
method image (line 43) | image(e,n,t){return""+t}
method br (line 43) | br(){return""}
class J (line 43) | class J{options;renderer;textRenderer;constructor(e){this.options=e||de,...
method constructor (line 43) | constructor(e){this.options=e||de,this.options.renderer=this.options.r...
method parse (line 43) | static parse(e,n){return new J(n).parse(e)}
method parseInline (line 43) | static parseInline(e,n){return new J(n).parseInline(e)}
method parse (line 43) | parse(e,n=!0){let t="";for(let s=0;s<e.length;s++){const r=e[s];if(thi...
method parseInline (line 44) | parseInline(e,n){n=n||this.renderer;let t="";for(let s=0;s<e.length;s+...
class Je (line 44) | class Je{options;constructor(e){this.options=e||de}static passThroughHoo...
method constructor (line 44) | constructor(e){this.options=e||de}
method preprocess (line 44) | preprocess(e){return e}
method postprocess (line 44) | postprocess(e){return e}
method processAllTokens (line 44) | processAllTokens(e){return e}
class yi (line 44) | class yi{defaults=St();options=this.setOptions;parse=this.#e(K.lex,J.par...
method constructor (line 44) | constructor(...e){this.use(...e)}
method walkTokens (line 44) | walkTokens(e,n){let t=[];for(const s of e)switch(t=t.concat(n.call(thi...
method use (line 44) | use(...e){const n=this.defaults.extensions||{renderers:{},childTokens:...
method setOptions (line 44) | setOptions(e){return this.defaults={...this.defaults,...e},this}
method lexer (line 44) | lexer(e,n){return K.lex(e,n??this.defaults)}
method parser (line 44) | parser(e,n){return J.parse(e,n??this.defaults)}
method #e (line 44) | #e(e,n){return(t,s)=>{const r={...s},i={...this.defaults,...r};this.de...
method #t (line 44) | #t(e,n){return t=>{if(t.message+=`
function b (line 45) | function b(c,e){return ge.parse(c,e)}
function G (line 45) | function G(c){return function(e){for(var n=arguments.length,t=new Array(...
function $i (line 45) | function $i(c){return function(){for(var e=arguments.length,n=new Array(...
function k (line 45) | function k(c,e){let n=arguments.length>2&&arguments[2]!==void 0?argument...
function Ii (line 45) | function Ii(c){for(let e=0;e<c.length;e++)Nt(c,e)===void 0&&(c[e]=null);...
function he (line 45) | function he(c){const e=En(null);for(const[n,t]of An(c))Nt(c,n)!==void 0&...
function Ve (line 45) | function Ve(c,e){for(;c!==null;){const t=Nt(c,e);if(t){if(t.get)return G...
method createHTML (line 45) | createHTML(i){return i}
method createScriptURL (line 45) | createScriptURL(i){return i}
function Ln (line 45) | function Ln(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[...
function Ki (line 46) | function Ki(){const c=Fn(Bn),[e,n]=Ze([{message:"How can I help you toda...
FILE: src/libre_chat/webapp/_astro/client.XqyIkt4q.js
method children (line 1) | get children(){return e()}
FILE: src/libre_chat/webapp/_astro/nanostores.RVhpkXze.js
function T (line 1) | function T(n){let e=n[y];if(!e&&(Object.defineProperty(n,y,{value:e=new ...
function w (line 1) | function w(n){let e;return n!=null&&typeof n=="object"&&(n[y]||!(e=Objec...
function S (line 1) | function S(n,e=new Set){let f,o,i,l;if(f=n!=null&&n[C])return f;if(!w(n)...
function E (line 1) | function E(n,e){let f=n[e];return f||Object.defineProperty(n,e,{value:f=...
function v (line 1) | function v(n,e,f){if(n[e])return n[e];const[o,i]=W(f,{equals:!1,internal...
function B (line 1) | function B(n,e){const f=Reflect.getOwnPropertyDescriptor(n,e);return!f||...
function F (line 1) | function F(n){L()&&v(E(n,j),N)()}
function Q (line 1) | function Q(n){return F(n),Reflect.ownKeys(n)}
method get (line 1) | get(n,e,f){if(e===C)return n;if(e===y)return f;if(e===K)return F(n),f;co...
method has (line 1) | has(n,e){return e===C||e===y||e===K||e===j||e===O||e==="__proto__"?!0:(L...
method set (line 1) | set(){return!0}
method deleteProperty (line 1) | deleteProperty(){return!0}
function b (line 1) | function b(n,e,f,o=!1){if(!o&&n[e]===f)return;const i=n[e],l=n.length;f=...
function U (line 1) | function U(n,e){const f=Object.keys(e);for(let o=0;o<f.length;o+=1){cons...
function X (line 1) | function X(n,e){if(typeof e=="function"&&(e=e(n)),e=S(e),Array.isArray(e...
function R (line 1) | function R(n,e,f=[]){let o,i=n;if(e.length>1){o=e.shift();const t=typeof...
function q (line 1) | function q(...[n,e]){const f=S(n||{}),o=Array.isArray(f),i=T(f);function...
function P (line 1) | function P(n,e,f,o,i){const l=e[f];if(n===l)return;const t=Array.isArray...
function H (line 1) | function H(n,e={}){const{merge:f,key:o="id"}=e,i=S(n);return l=>{if(!w(l...
function x (line 1) | function x(n){let e=n.get(),[f,o]=Y(e),i=n.subscribe(o);return z(()=>i()...
function Y (line 1) | function Y(n){let[e,f]=q({value:n});return[()=>e.value,o=>{let i=S(e.val...
method get (line 1) | get(){return o.lc||o.listen(()=>{})(),o.value}
method listen (line 1) | listen(i,l){return o.lc=f.push(i,l||o.l)/2,()=>{let t=f.indexOf(i);~t&&(...
method notify (line 1) | notify(i){let l=!h.length;for(let t=0;t<f.length;t+=2)h.push(f[t],f[t+1]...
method off (line 1) | off(){}
method set (line 1) | set(i){o.value!==i&&(o.value=i,o.notify())}
method subscribe (line 1) | subscribe(i,l){let t=o.listen(i,l);return i(o.value),t}
function m (line 1) | function m(n){J.set(n)}
FILE: src/libre_chat/webapp/_astro/web.zg9RI5L8.js
function N (line 1) | function N(e){u.context=e}
function de (line 1) | function de(){return{...u.context,id:`${u.context.id}${u.context.count++...
function F (line 1) | function F(e,t){const n=h,s=d,i=e.length===0,r=t===void 0?s:t,f=i?ee:{ow...
function V (line 1) | function V(e,t){t=t?Object.assign({},j,t):j;const n={value:e,observers:n...
function M (line 1) | function M(e,t,n){const s=W(e,t,!1,T);B(s)}
function Ie (line 1) | function Ie(e,t,n){z=me;const s=W(e,t,!1,T),i=O&&se(O);i&&(s.suspense=i)...
function L (line 1) | function L(e,t,n){n=n?Object.assign({},j,n):j;const s=W(e,t,!0,0);return...
function Me (line 1) | function Me(e){return P(e,!1)}
function $ (line 1) | function $(e){if(h===null)return e();const t=h;h=null;try{return e()}fin...
function te (line 1) | function te(e){return d===null||(d.cleanups===null?d.cleanups=[e]:d.clea...
function Oe (line 1) | function Oe(){return h}
function ye (line 1) | function ye(){return d}
function be (line 1) | function be(e){m.push.apply(m,e),e.length=0}
function ne (line 1) | function ne(e,t){const n=Symbol("context");return{id:n,Provider:ve(n),de...
function se (line 1) | function se(e){return d&&d.context&&d.context[e.id]!==void 0?d.context[e...
function xe (line 1) | function xe(e){const t=L(e),n=L(()=>K(t()));return n.toArray=()=>{const ...
function we (line 1) | function we(){return O||(O=ne())}
function ie (line 1) | function ie(){if(this.sources&&this.state)if(this.state===T)B(this);else...
function le (line 1) | function le(e,t,n){let s=e.value;return(!e.comparator||!e.comparator(s,t...
function B (line 1) | function B(e){if(!e.fn)return;q(e);const t=Y;Ae(e,e.value,t)}
function Ae (line 1) | function Ae(e,t,n){let s;const i=d,r=h;h=d=e;try{s=e.fn(t)}catch(f){retu...
function W (line 1) | function W(e,t,n,s=T,i){const r={fn:e,state:s,updatedAt:null,owned:null,...
function _ (line 1) | function _(e){if(e.state===0)return;if(e.state===I)return U(e);if(e.susp...
function P (line 1) | function P(e,t){if(b)return e();let n=!1;t||(b=[]),m?n=!0:m=[],Y++;try{c...
function Se (line 1) | function Se(e){if(b&&(re(b),b=null),e)return;const t=m;m=null,t.length&&...
function re (line 1) | function re(e){for(let t=0;t<e.length;t++)_(e[t])}
function me (line 1) | function me(e){let t,n=0;for(t=0;t<e.length;t++){const s=e[t];s.user?e[n...
function U (line 1) | function U(e,t){e.state=0;for(let n=0;n<e.sources.length;n+=1){const s=e...
function oe (line 1) | function oe(e){for(let t=0;t<e.observers.length;t+=1){const n=e.observer...
function q (line 1) | function q(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sourc...
function Ce (line 1) | function Ce(e){return e instanceof Error?e:new Error(typeof e=="string"?...
function fe (line 1) | function fe(e,t=d){throw Ce(e)}
function K (line 1) | function K(e){if(typeof e=="function"&&!e.length)return K(e());if(Array....
function ve (line 1) | function ve(e,t){return function(s){let i;return M(()=>i=$(()=>(d.contex...
function X (line 1) | function X(e){for(let t=0;t<e.length;t++)e[t]()}
function $e (line 1) | function $e(e,t,n={}){let s=[],i=[],r=[],f=0,l=t.length>1?[]:null;return...
function Te (line 1) | function Te(){ue=!0}
function Ne (line 1) | function Ne(e,t){if(ue&&u.context){const n=u.context;N(de());const s=$((...
function _e (line 1) | function _e(e){const t="fallback"in e&&{fallback:()=>e.fallback};return ...
function Ue (line 1) | function Ue(e){let t=0,n,s,i,r,f;const[l,a]=V(!1),c=we(),o={increment:()...
function He (line 1) | function He(e,t,n){let s=n.length,i=t.length,r=s,f=0,l=0,a=t[i-1].nextSi...
function Le (line 1) | function Le(e,t,n,s={}){let i;return F(r=>{i=r,t===document?e():Pe(t,e()...
function De (line 1) | function De(e,t,n){let s;const i=()=>{const f=document.createElement("te...
function Ye (line 1) | function Ye(e,t=window.document){const n=t[Q]||(t[Q]=new Set);for(let s=...
function qe (line 1) | function qe(e,t,n){!u.context&&(e[t]=n)}
function Re (line 1) | function Re(e,t,n){u.context||(n==null?e.removeAttribute(t):e.setAttribu...
function Ve (line 1) | function Ve(e,t){u.context||(t==null?e.removeAttribute("class"):e.classN...
function Ke (line 1) | function Ke(e,t,n){return $(()=>e(t,n))}
function Pe (line 1) | function Pe(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")retu...
function Fe (line 1) | function Fe(e,t,n={}){u.completed=globalThis._$HY.completed,u.events=glo...
function Ge (line 1) | function Ge(e){let t,n;return!u.context||!(t=u.registry.get(n=Be()))?e()...
function We (line 1) | function We(e){let t=e,n=0,s=[];if(u.context)for(;t;){if(t.nodeType===8)...
function Xe (line 1) | function Xe(){u.events&&!u.events.queued&&(queueMicrotask(()=>{const{com...
function ce (line 1) | function ce(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPat...
function D (line 1) | function D(e,t,n,s,i){if(u.context){!n&&(n=[...e.childNodes]);let l=[];f...
function G (line 1) | function G(e,t,n,s){let i=!1;for(let r=0,f=t.length;r<f;r++){let l=t[r],...
function J (line 1) | function J(e,t,n=null){for(let s=0,i=t.length;s<i;s++)e.insertBefore(t[s...
function H (line 1) | function H(e,t,n,s){if(n===void 0)return e.textContent="";const i=s||doc...
function Z (line 1) | function Z(e,t){const n=e.querySelectorAll("*[data-hk]");for(let s=0;s<n...
function Be (line 1) | function Be(){const e=u.context;return`${e.id}${e.count++}`}
FILE: tests/test_api.py
function test_post_prompt_conversation (line 18) | def test_post_prompt_conversation() -> None:
function test_get_prompt_conversation (line 30) | def test_get_prompt_conversation() -> None:
function test_websocket_prompt_conversation (line 38) | def test_websocket_prompt_conversation() -> None:
function test_get_gradio_ui (line 51) | def test_get_gradio_ui() -> None:
FILE: tests/test_api_qa.py
function test_websocket_prompt_vectorstore_qa (line 18) | def test_websocket_prompt_vectorstore_qa() -> None:
function test_documents_success_upload (line 32) | def test_documents_success_upload() -> None:
function test_documents_success_list (line 48) | def test_documents_success_list() -> None:
function test_wrong_pass (line 58) | def test_wrong_pass() -> None:
function test_documents_empty_files (line 76) | def test_documents_empty_files() -> None:
function test_get_config (line 85) | def test_get_config() -> None:
function test_post_config (line 92) | def test_post_config() -> None:
FILE: tests/test_cli.py
function test_help (line 11) | def test_help() -> None:
function test_version (line 16) | def test_version() -> None:
function test_build (line 21) | def test_build() -> None:
function test_build_no_args (line 36) | def test_build_no_args() -> None:
function test_start (line 50) | def test_start(mock_run: MagicMock) -> None:
FILE: tests/test_llm.py
function test_query_vectorstore_capital (line 13) | def test_query_vectorstore_capital() -> None:
function test_query_vectorstore_gdp (line 20) | def test_query_vectorstore_gdp() -> None:
function test_failed_empty_query (line 32) | def test_failed_empty_query() -> None:
function test_failed_empty_aquery (line 40) | async def test_failed_empty_aquery() -> None:
function test_build_vectorstore (line 47) | def test_build_vectorstore() -> None:
function test_build_failed_no_docs (line 58) | def test_build_failed_no_docs() -> None:
function test_similarity_score_threshold (line 72) | def test_similarity_score_threshold() -> None:
function test_documents_dir_dont_exist (line 82) | def test_documents_dir_dont_exist() -> None:
function test_llm_failed_no_prompt_variables (line 91) | def test_llm_failed_no_prompt_variables() -> None:
function test_no_prompt_template (line 98) | def test_no_prompt_template() -> None:
FILE: tests/test_utils.py
function test_no_conf_file (line 9) | def test_no_conf_file() -> None:
function test_chat_response (line 15) | def test_chat_response() -> None:
function test_download_file_fail (line 25) | def test_download_file_fail() -> None:
function test_parallel_download_success (line 31) | def test_parallel_download_success() -> None:
Condensed preview — 79 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (819K chars).
[
{
"path": ".dockerignore",
"chars": 521,
"preview": "models/\nvectorstore/\nembeddings/\ndata/\ngradio_cached_examples/\nsentence-transformers/\ntry-*/\ntests/tmp/\ndocker-compose.p"
},
{
"path": ".github/ISSUE_TEMPLATE/bug.yml",
"chars": 1162,
"preview": "name: 🐞 Bug Report\ndescription: Report a bug\nlabels: ['bug']\n\nbody:\n - type: markdown\n attributes:\n value: |\n "
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.yml",
"chars": 693,
"preview": "name: 💡 Feature request\ndescription: Suggest an idea.\nlabels: ['enhancement']\n\nbody:\n - type: textarea\n id: descript"
},
{
"path": ".github/workflows/release.yml",
"chars": 836,
"preview": "name: Release\non:\n workflow_dispatch:\n release:\n types: [published]\n\njobs:\n\n tests:\n uses: vemonet/libre-chat/."
},
{
"path": ".github/workflows/test.yml",
"chars": 7053,
"preview": "name: Tests\non:\n push:\n branches: [ \"main\" ]\n pull_request:\n workflow_call:\n workflow_dispatch:\n\njobs:\n\n tests:\n"
},
{
"path": ".gitignore",
"chars": 526,
"preview": "models/\nvectorstore/\nembeddings/\ndata/\ngradio_cached_examples/\nsentence-transformers/\ntry-*/\ntests/tmp/\ndocker-compose.p"
},
{
"path": ".pre-commit-config.yaml",
"chars": 973,
"preview": "# See https://pre-commit.com for more information\nrepos:\n - repo: https://github.com/pre-commit/pre-commit-hooks\n re"
},
{
"path": "CITATION.cff",
"chars": 451,
"preview": "cff-version: 1.2.0\nmessage: \"If you use this software, please cite it as below.\"\nauthors:\n - orcid: https://orcid.org/"
},
{
"path": "Dockerfile",
"chars": 1115,
"preview": "ARG BASE_IMAGE=nvcr.io/nvidia/cuda:12.1.0-runtime-ubuntu22.04\n\n# ARG BASE_IMAGE=python:3.11\n# 2.7GB cf. https://ngc.nvid"
},
{
"path": "LICENSE.txt",
"chars": 1106,
"preview": "MIT License\n\nCopyright (c) 2023-present Vincent Emonet <vincent.emonet@gmail.com>\n\nPermission is hereby granted, free of"
},
{
"path": "README.md",
"chars": 8930,
"preview": "<div align=\"center\">\n\n# <span><img height=\"30\" src=\"https://raw.github.com/vemonet/libre-chat/main/docs/docs/assets/logo"
},
{
"path": "chat.yml",
"chars": 1430,
"preview": "# Config for a generic conversational agent\nllm:\n model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf\n model_dow"
},
{
"path": "config/chat-conversation.yml",
"chars": 1430,
"preview": "# Config for a generic conversational agent\nllm:\n model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf\n model_dow"
},
{
"path": "config/chat-vectorstore-qa.yml",
"chars": 2927,
"preview": "# Config for a Question Answering (qa) agent\n# Will answer based on provided documents, and return which docs was used t"
},
{
"path": "docker-compose.yml",
"chars": 2264,
"preview": "version: \"3\"\nservices:\n\n libre-chat:\n # depends_on: [qdrant]\n build: .\n # image: ghcr.io/vemonet/libre-chat:ma"
},
{
"path": "docs/docs/ChatConf.md",
"chars": 44,
"preview": "# Chat Config\n\n::: libre_chat.conf.ChatConf\n"
},
{
"path": "docs/docs/ChatEndpoint.md",
"chars": 53,
"preview": "# LLM Endpoint\n\n::: libre_chat.endpoint.ChatEndpoint\n"
},
{
"path": "docs/docs/ChatRouter.md",
"chars": 48,
"preview": "# Chat Router\n\n::: libre_chat.router.ChatRouter\n"
},
{
"path": "docs/docs/Llm.md",
"chars": 30,
"preview": "# LLM\n\n::: libre_chat.llm.Llm\n"
},
{
"path": "docs/docs/assets/custom.css",
"chars": 40,
"preview": "code.highlight {\n font-size: 18px;\n}\n"
},
{
"path": "docs/docs/configure-conversation.md",
"chars": 1763,
"preview": "Create a `chat.yml` file with your configuration before starting the web service.\n\nBelow is an example of configuration "
},
{
"path": "docs/docs/configure-documents-qa.md",
"chars": 8044,
"preview": "!!! warning \"Experimental\"\n\n Documents-based question answering is still experimental and subject to changes.\n\nThe de"
},
{
"path": "docs/docs/development.md",
"chars": 5216,
"preview": "<div align=\"center\" markdown=\"span\">\n\n[](https://pypi.org/project/li"
},
{
"path": "docs/docs/index.md",
"chars": 7498,
"preview": "<div align=\"center\" markdown=\"span\">\n\n[](https://pypi.org/project/li"
},
{
"path": "docs/docs/use-docker.md",
"chars": 1848,
"preview": "[](https://github.com/vemonet/libre-chat/pkgs/containe"
},
{
"path": "docs/docs/use-pip.md",
"chars": 2299,
"preview": "[](https://pypi.org/project/libre-chat) [.Config} */\nexport default {\n\tcontent: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,"
},
{
"path": "frontend/tsconfig.json",
"chars": 127,
"preview": "{\n \"extends\": \"astro/tsconfigs/strict\",\n \"compilerOptions\": {\n \"jsx\": \"preserve\",\n \"jsxImportSource\": \"solid-js\""
},
{
"path": "pyproject.toml",
"chars": 7034,
"preview": "[build-system]\nrequires = [\"hatchling\"]\nbuild-backend = \"hatchling.build\"\n\n[project]\nrequires-python = \">=3.8\"\nname = \"l"
},
{
"path": "scripts/deploy.sh",
"chars": 408,
"preview": "#!/bin/bash\n\nif [ \"$1\" = \"--no-cache\" ]; then\n echo \"📦️ Building without cache\"\n ssh idsg1 'cd /mnt/um-share-drive"
},
{
"path": "scripts/download.sh",
"chars": 546,
"preview": "#!/bin/bash\n\n# Use this script to quickly download the default model and embeddings\n\n# https://public.ukp.informatik.tu-"
},
{
"path": "scripts/init.py",
"chars": 1713,
"preview": "import logging\nimport os\nimport shutil\n\nfrom libre_chat import log, parse_conf\n\n# from libre_chat.vectorstore import bui"
},
{
"path": "scripts/langchain.ipynb",
"chars": 17374,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# 🦙 Local LLM inference with LlamaC"
},
{
"path": "scripts/main.py",
"chars": 401,
"preview": "import logging\n\nfrom libre_chat.conf import parse_conf\nfrom libre_chat.endpoint import ChatEndpoint\nfrom libre_chat.llm "
},
{
"path": "scripts/qdrant_config.yml",
"chars": 273,
"preview": "# Default: https://github.com/qdrant/qdrant/blob/master/config/config.yaml\nlog_level: INFO\ntelemetry_disabled: true\n\nser"
},
{
"path": "scripts/requirements.txt",
"chars": 9751,
"preview": "#\n# This file is autogenerated by pip-compile with Python 3.10\n# by the following command:\n#\n# pip-compile --output-f"
},
{
"path": "scripts/start.sh",
"chars": 2362,
"preview": "#!/usr/bin/env sh\nset -e\n\n# Adapted from https://github.com/tiangolo/uvicorn-gunicorn-docker/blob/master/docker-images/s"
},
{
"path": "src/libre_chat/__init__.py",
"chars": 223,
"preview": "\"\"\"API and UI to deploy LLM models.\"\"\"\nfrom .utils import Prompt, log\nfrom .conf import default_conf, parse_conf\nfrom .l"
},
{
"path": "src/libre_chat/__main__.py",
"chars": 2846,
"preview": "import logging\nimport os\nimport shutil\nfrom typing import Optional\n\nimport typer\nimport uvicorn\n\nfrom libre_chat import "
},
{
"path": "src/libre_chat/conf.py",
"chars": 3640,
"preview": "import os\nfrom typing import Dict, List, Optional\n\nfrom pydantic_settings import BaseSettings, SettingsConfigDict\nfrom p"
},
{
"path": "src/libre_chat/endpoint.py",
"chars": 4783,
"preview": "import time\nfrom typing import Any, List, Optional\n\nimport gradio as gr\nimport pkg_resources\nfrom fastapi import FastAPI"
},
{
"path": "src/libre_chat/llm.py",
"chars": 15000,
"preview": "\"\"\"Module: Open-source LLM setup\"\"\"\nimport os\nfrom typing import Any, Dict, List, Optional\n\nimport torch\nfrom langchain."
},
{
"path": "src/libre_chat/py.typed",
"chars": 0,
"preview": ""
},
{
"path": "src/libre_chat/router.py",
"chars": 10256,
"preview": "import os\nimport zipfile\nfrom dataclasses import dataclass\nfrom typing import Any, Dict, List, Optional, Union\n\nimport w"
},
{
"path": "src/libre_chat/static/web-worker.js",
"chars": 972,
"preview": "// Web worker to cache assets\n// TODO: remove? Now unused\nconst CACHE_NAME = 'libre-chat-assets';\n\nself.addEventListener"
},
{
"path": "src/libre_chat/ui.py",
"chars": 9126,
"preview": "\"\"\"Module: Gradio web UI for LangChain chatbot\"\"\"\nfrom collections.abc import Iterator\nfrom queue import Empty, Queue\nfr"
},
{
"path": "src/libre_chat/utils.py",
"chars": 4678,
"preview": "import logging\nimport os\nimport shutil\nimport zipfile\nfrom concurrent.futures import ThreadPoolExecutor\nfrom dataclasses"
},
{
"path": "src/libre_chat/vectorstore.py",
"chars": 4890,
"preview": "\"\"\"Module: Open-source LLM setup\"\"\"\nimport os\nfrom datetime import datetime\nfrom typing import Any, Dict, List, Optional"
},
{
"path": "src/libre_chat/webapp/_astro/Nav.FPLT-AC_.js",
"chars": 3235,
"preview": "import{d as S,k as y,c as E,g as A,i as j,f as I,r as B,s as d,t as T}from\"./web.zg9RI5L8.js\";import{p as U,$ as z,a as "
},
{
"path": "src/libre_chat/webapp/_astro/admin.e50kLjN3.css",
"chars": 52589,
"preview": "*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-conten"
},
{
"path": "src/libre_chat/webapp/_astro/admin.uwsUQjhr.js",
"chars": 354,
"preview": "import{g as e,t as r}from\"./web.zg9RI5L8.js\";var a=r('<main class=\"flex flex-col bg-gray-100 dark:bg-gray-800 text-black"
},
{
"path": "src/libre_chat/webapp/_astro/chat.mnOtRnw4.js",
"chars": 60108,
"preview": "import{d as zn,c as Ze,g as le,a as Ye,i as V,b as ht,e as gt,s as Kt,f as dt,r as mt,u as Pn,h as Jt,t as ae,F as kt,j "
},
{
"path": "src/libre_chat/webapp/_astro/client.XqyIkt4q.js",
"chars": 868,
"preview": "import{p as F,q as I,b as d,S as L}from\"./web.zg9RI5L8.js\";var R=t=>(u,l,s,{client:a})=>{if(!t.hasAttribute(\"ssr\"))retur"
},
{
"path": "src/libre_chat/webapp/_astro/nanostores.RVhpkXze.js",
"chars": 5900,
"preview": "import{$ as y,l as K,m as L,n as M,c as W,o as z}from\"./web.zg9RI5L8.js\";const C=Symbol(\"store-raw\"),j=Symbol(\"store-nod"
},
{
"path": "src/libre_chat/webapp/_astro/web.zg9RI5L8.js",
"chars": 12861,
"preview": "const u={context:void 0,registry:void 0};function N(e){u.context=e}function de(){return{...u.context,id:`${u.context.id}"
},
{
"path": "src/libre_chat/webapp/admin/index.html",
"chars": 4632,
"preview": "<!DOCTYPE html><html lang=\"en\" data-theme=\"dark\"> <head><meta charset=\"UTF-8\"><meta name=\"description\" content=\"Open sou"
},
{
"path": "src/libre_chat/webapp/index.html",
"chars": 4629,
"preview": "<!DOCTYPE html><html lang=\"en\" data-theme=\"dark\"> <head><meta charset=\"UTF-8\"><meta name=\"description\" content=\"Open sou"
},
{
"path": "tests/__init__.py",
"chars": 35,
"preview": "\"\"\"Tests for :mod:`libre_chat`.\"\"\"\n"
},
{
"path": "tests/config/additional-prop.yml",
"chars": 2661,
"preview": "# Config for a generic conversational agent\nllm:\n model_path: ./models/mixtral-8x7b-instruct-v0.1.Q2_K.gguf\n model_dow"
},
{
"path": "tests/test_api.py",
"chars": 1870,
"preview": "\"\"\"Test a generic conversational chatbot without vectorstore\"\"\"\nimport json\n\nfrom fastapi.testclient import TestClient\n\n"
},
{
"path": "tests/test_api_qa.py",
"chars": 3100,
"preview": "\"\"\"Test a question-answering chatbot with a vectorstore\"\"\"\nimport os\n\nfrom fastapi.testclient import TestClient\n\nfrom li"
},
{
"path": "tests/test_cli.py",
"chars": 1159,
"preview": "import shutil\nfrom unittest.mock import MagicMock, patch\n\nfrom typer.testing import CliRunner\n\nfrom libre_chat.__main__ "
},
{
"path": "tests/test_llm.py",
"chars": 4501,
"preview": "import os\nimport shutil\n\nimport pytest\n\nfrom libre_chat.conf import parse_conf\nfrom libre_chat.llm import Llm\n\nllm = Llm"
},
{
"path": "tests/test_utils.py",
"chars": 1384,
"preview": "import os\n\nimport pytest\n\nfrom libre_chat.conf import parse_conf\nfrom libre_chat.utils import ChatResponse, download_fil"
}
]
About this extraction
This page contains the full source code of the vemonet/libre-chat GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 79 files (769.2 KB), approximately 295.6k tokens, and a symbol index with 275 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.