Skip to content

Conversation

@kapsterdam
Copy link
Collaborator

✨ Highlights – Backend & API

  • Unified /chat handler

    • Accepts JSON or multipart requests.
    • Added local Whisper transcription when an audio/* part is present.
    • Persists every turn to PostgreSQL (chat_log).
  • Similarity search upgrade (/analyze)

    • New top_k query‑param – returns up to N best–matching intents, capped automatically.
    • Robust MIME check & clearer error paths.
  • “Yap” conversational flow (scenario 2)

    • Endpoints: /yap, /yap/start, /yap/next.
    • Dual‑agent negotiation (burger ⇄ gemeente) with draft generation.
    • Sessions live in RAM but every utterance is mirrored to yap_log in Postgres.
  • LangChain refactor (templates.py)

    • make_chain() now receives the session dict to keep the running draft in sync.
    • Strict JSON enforcement via JsonOutputParser + PydanticOutputParser.
  • Dynamic intent modelling (models.py, intents.py)

    • Checklist booleans, draft, and vragen list generated on‑the‑fly per intent.
  • Infrastructure helpers

    • Dockerfile for a local PostgreSQL 16 instance.
    • Async connection pool (asyncpg) with auto‑migration on startup.
  • Documentation

    • README sections for new parameters, audio upload, and Yap endpoints.

  • ** To do **

  • Modify prompts and re-test

  • Change the whisper model AKA put .env variables in the init.py

  • Language parameter support

@jurb jurb force-pushed the feature/app-scaffold branch from 2c67cdc to e671193 Compare August 7, 2025 19:45
Ubuntu and others added 20 commits August 19, 2025 13:00
…fix-draft

fixed arguments for make_chain
Restore internationalization functionality that was lost during recent merges:
- Add missing model creation imports to templates.py
- Update _yap_generate() to use language-specific models and prompts
- Fix _yap_check_finished() to use localized completion keywords
- Restore local Whisper fallback when TRANSCRIPTION_API_KEY is missing

Fixes TypeError: _yap_generate() takes 3 positional arguments but 4 were given
Fixes NameError: name 'GemeenteTurnModel' is not defined
Fixes RuntimeError: TRANSCRIPTION_API_KEY not set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants