tinystruct/smalltalk
A tinystruct-based chat module which integrated with @OpenAI GPT-4 / 3.5-turbo / ChatGPT. @tinystruct
What it solves
Smalltalk is an instant messaging application that integrates AI capabilities to enhance communication. It solves the problem of static chat interfaces by allowing users to interact with ChatGPT and perform Retrieval-Augmented Generation (RAG) over their own uploaded documents, turning a chat app into a a knowledge base assistant.
How it works
The project uses a Java-based framework (tinystruct) and SQLite for storage. It integrates the OpenAI API for both chat and embeddings. When a user uploads a document (PDF, Word, Excel, etc.), the system uses Apache Tika to extract text, fragments the text, and stores embeddings of those fragments in SQLite. When a user asks a question, the system converts the query into an embedding, retrieves the most relevant fragments and includes them in the prompt sent to ChatGPT to provide context-aware answers.
Who it’s for
Developers and users who want a self-hosted instant messaging platform with built-in AI assistance and the ability to query their own documents via a chat interface.
Highlights
- Multi-interface support: Provides both a command-line interface (CLI) and a web interface.
- RAG capabilities: Supports document upload and automated processing for AI-powered document QA.
- Broad document support: Handles plain text, Markdown, PDF, Word, Excel, and PowerPoint files via Apache Tika.
- Flexible deployment: Can be run as a standalone Java app, on Tomcat/Netty servers, or via Docker.
Related
- Project
- Project
- Project
- Project
- Project