https://github.com/imaurer/pypi-gpt
FastAPI Custom GPT demo
https://github.com/imaurer/pypi-gpt
custom-gpt custom-gpts fastapi pypi-packages
Last synced: 7 months ago
JSON representation
FastAPI Custom GPT demo
- Host: GitHub
- URL: https://github.com/imaurer/pypi-gpt
- Owner: imaurer
- License: other
- Created: 2023-12-11T18:12:07.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-22T18:51:49.000Z (almost 2 years ago)
- Last Synced: 2025-04-12T13:00:34.001Z (7 months ago)
- Topics: custom-gpt, custom-gpts, fastapi, pypi-packages
- Language: Python
- Homepage:
- Size: 2.82 MB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PyPI GPT
This is an open-source demonstration (MIT License) of building actions for Custom GPTs. It is
built with FastAPI, SQLModel and Pydantic.
This project is NOT associated with [Python Software Foundation](https://www.python.org/psf-landing/)
or the [Python Package Index (PyPI)](https://pypi.org/).
The data used was downloaded from the [pypi-data/pypi-json-data](https://github.com/pypi-data/pypi-json-data)
repository.
## Getting Started
### Setup Environment
This project was built using Python 3.11 and the Makefile scripts assume a virtual environment
can be found under the relative path `./env` from the root of the project.
I have a Makefile for the major steps, below is a description of those steps.
#### Create Environment and Install Dependencies
```bash
$ python3.11 -m venv env
$ make install
```
#### Download, Unzip and Index Database
Downloads data from the [pypi-data/pypi-json-data](https://github.com/pypi-data/pypi-json-data) project.
Unzips and indexes the file.
```bash
$ make download_db
```
#### Test Code
```bash
$ make test
$ make cov
```
#### Run API
You need to run this on a server or service that supports HTTPS. I use ngrok and nginx locally.
```bash
$ export PYPI_GPT_SERVER_HOSTNAME=(YOUR HOST NAME HERE!)
$ make api
```
### Screenshots
#### Configure Custom GPT

#### OpenAPI Spec

#### Import Actions

#### Chat Calls Server

#### OpenAPI Response

#### Chat Formats Result