Skip to content

Commit

Permalink
Merge pull request #25 from technologiestiftung/staging
Browse files Browse the repository at this point in the history
Feat/readme (#24)
  • Loading branch information
Jaszkowic authored Nov 8, 2024
2 parents 64508d7 + 12a98a4 commit b61c7d2
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 14 deletions.
36 changes: 36 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"projectName": "ber-gpt-backend",
"projectOwner": "technologiestiftung",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": true,
"commitConvention": "angular",
"contributors": [
{
"login": "Jaszkowic",
"name": "Jonas Jaszkowic",
"avatar_url": "https://avatars.githubusercontent.com/u/10830180?v=4",
"profile": "https://github.com/Jaszkowic",
"contributions": [
"code",
"infra",
"doc"
]
},
{
"login": "raphael-arce",
"name": "Raphael.A",
"avatar_url": "https://avatars.githubusercontent.com/u/8709861?v=4",
"profile": "https://github.com/raphael-arce",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
"linkToUsage": true
}
70 changes: 56 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,54 @@

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

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

<!-- ALL-CONTRIBUTORS-BADGE:END -->

# BärGPT Backend

This project serves as the backend for the "BärGPT" project. It exposes various endpoints which are used to communicate with LLMs.
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)

## Installation
## Development setup

- `git clone [email protected]:technologiestiftung/ber-gpt-backend .git`
- `nvm install`
- `nvm use`
- `npm install`
- `git clone [email protected]:technologiestiftung/ber-gpt-backend.git`

## Usage or Deployment
Prepare env variables by copying `.env.sample` to `.env` and setting the appropriate values:

- `npm run dev`
```
CORS_ALLOWED_ORIGIN=http://localhost:5173
RATE_LIMIT_REQUESTS_PER_MINUTE=30
X_API_KEY="set to a secure api key of your choice"
## Development
# config for Azure LLM
AZURE_LLM_API_KEY=...
AZURE_LLM_ENDPOINT="https://<your_hub>.openai.azure.com/openai/deployments/gpt-35-turbo-16k/chat/completions?api-version=2023-03-15-preview"
tbd...
# config for OpenAI LLM
OPENAI_ENDPOINT="https://api.openai.com/v1/chat/completions"
OPENAI_API_KEY=sk-...
```

## Tests
Install dependencies:

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

Run the API:

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

## Contributing

Expand All @@ -43,6 +59,32 @@ Before you create a pull request, write an issue so we can discuss your changes.

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

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Jaszkowic"><img src="https://avatars.githubusercontent.com/u/10830180?v=4?s=100" width="100px;" alt="Jonas Jaszkowic"/><br /><sub><b>Jonas Jaszkowic</b></sub></a><br /><a href="https://github.com/technologiestiftung/ber-gpt-backend/commits?author=Jaszkowic" title="Code">💻</a> <a href="#infra-Jaszkowic" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/technologiestiftung/ber-gpt-backend/commits?author=Jaszkowic" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/raphael-arce"><img src="https://avatars.githubusercontent.com/u/8709861?v=4?s=100" width="100px;" alt="Raphael.A"/><br /><sub><b>Raphael.A</b></sub></a><br /><a href="https://github.com/technologiestiftung/ber-gpt-backend/commits?author=raphael-arce" title="Code">💻</a></td>
</tr>
</tbody>
<tfoot>
<tr>
<td align="center" size="13px" colspan="7">
<img src="https://raw.githubusercontent.com/all-contributors/all-contributors-cli/1b8533af435da9854653492b1327a23a4dbd0a10/assets/logo-small.svg">
<a href="https://all-contributors.js.org/docs/en/bot/usage">Add your contributions</a>
</img>
</td>
</tr>
</tfoot>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
Expand Down Expand Up @@ -92,4 +134,4 @@ Texts and content available as [CC BY](https://creativecommons.org/licenses/by/3

## Related Projects

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

0 comments on commit b61c7d2

Please sign in to comment.