Skip to content

Repository files navigation

Wahlkumpel

A chat buddy that answers questions on the German elections Feb 2025 based on the PDF manifestos of each party of the main parties (AFD, BSW, CDU/CSU, Die Linke, FDP, Die Gruenen, and SPD.

The app supports both the English and German languages.

The suggested questions are generated by the agent and could be used to ask the app for more information.

Motive

Since most of the leading parties wrote their electoral programs in PDF format, and in the German language, and since I (and probably others) speak German only on the B1 level, which isn't enough to follow through hundreds of pages written in advanced German, I thought that'd be a nice way to break into the world of German politics :-)

I also wanted to play around with Langchain and see what the hype is about :-)

Expectations

The first iteration should be able to consume all the PDF files that detail the election plan for each major party and answer the most burning questions.

How to run locally

This agent uses OpenAI's API, which isn't free, unfortunately. If you feel like trying the app locally, you can create an API key https://openai.com/index/openai-api/ and then export an env variable

OPENAI_API_KEY=...
PINECONE_API_KEY=...

You can then run either the dockerized version

docker-compose build wahlkumpel
docker-compose up --no-start wahlkumpel
docker-compose start wahlkumpel

or running the app using uv

# install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# create venv
uv venv

# install requirements
uv sync

# run the app
uv run fastapi dev src/me/daif/main.py

About

A chat buddy that answers questions on the German elections Feb 2025

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages