Перейти к содержимому

Wiring the Backend Together: Thread Service & gRPC in C# — Local AI Chat App #6

Black foxi code

0:00 / 0:00

Wiring the Backend Together: Thread Service & gRPC in C# — Local AI Chat App #6

43 просмотра · 11 дней назад
Black foxi code
6 подписчиков
43 просмотра · 11 дней назад
github: https://github.com/Denys1209/AI-web-c... the database to the model — building ThreadService and GrpcService so a saved conversation can actually talk to our local LLM. In this episode, I build out ThreadService and GrpcService for our local AI chat app. We cover: 🧵 ThreadService — creating threads, saving messages, building conversation history, and the ownership-check pattern that keeps one user's threads private from another. 📡 GrpcService — bridging saved messages to the Python inference server: mapping entities to protobuf messages, handling image attachments, and calling the model over gRPC. 🔄 How the two services work together: a message gets saved first (so it survives if generation fails), then history gets built and handed off to the model for a response. This is part of a series building a full local AI chat app from scratch: a Gemma model running via Python + llama.cpp, bridged to a C# API over gRPC, backed by PostgreSQL with EF Core, with a Next.js frontend now underway.