Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/technologiestiftung/ber-gpt-backend


https://github.com/technologiestiftung/ber-gpt-backend

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

![](https://img.shields.io/badge/Built%20with%20%E2%9D%A4%EF%B8%8F-at%20Technologiestiftung%20Berlin-blue)

[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)

# BärGPT Backend

This project serves as the backend for the "BärGPT" project, see [BärGPT Frontend](https://github.com/technologiestiftung/ber-gpt-frontend).

It exposes various endpoints which are used to communicate with LLMs.

It allows for communicating with OpenAI API and a self-hosted LLM on Azure.

## Prerequisites

- OpenAI Account and API key (https://platform.openai.com/)
- Azure account and deployed LLM model on Azure (https://azure.com/)
- Node.js (https://nodejs.org/en)
- NVM (https://github.com/nvm-sh/nvm)

## Development setup

- `git clone [email protected]:technologiestiftung/ber-gpt-backend.git`

Prepare env variables by copying `.env.sample` to `.env` and setting the appropriate values:

```
CORS_ALLOWED_ORIGIN=http://localhost:5173
RATE_LIMIT_REQUESTS_PER_MINUTE=30
X_API_KEY="set to a secure api key of your choice"

# config for Azure LLM
AZURE_LLM_API_KEY=...
AZURE_LLM_ENDPOINT="https://.openai.azure.com/openai/deployments/gpt-35-turbo-16k/chat/completions?api-version=2023-03-15-preview"

# config for OpenAI LLM
OPENAI_ENDPOINT="https://api.openai.com/v1/chat/completions"
OPENAI_API_KEY=sk-...
```

Install dependencies:

- `nvm install && nvm use`
- `npm ci`

Run the API:

- `npm run dev`
- API is now running on `http://localhost:3000`

## Contributing

Before you create a pull request, write an issue so we can discuss your changes.

## Contributors

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Jonas Jaszkowic
Jonas Jaszkowic

💻 🚇 📖
Raphael.A
Raphael.A

💻






Add your contributions




This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

## Content Licensing

Texts and content available as [CC BY](https://creativecommons.org/licenses/by/3.0/de/).

## Credits



Made by








A project by








Supported by







## Related Projects

- BärGPT Frontend (https://github.com/technologiestiftung/ber-gpt-frontend)