| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
smalltalk is a tinystruct-based project that provides instant messaging functionality, It allows users to send text and share images, documents, and other content. Also, It allows you to interact with ChatGPT which is a language model developed by OpenAI through a command-line interface (CLI) or a web interface.
git clone https://github.com/tinystruct/smalltalk.git If your current envirionment is using JDK 8, you can execute the below command to upgrade it quickly.
bin/openjdk-upgrade
./mvnw compileYou can run smalltalk in different ways:
CLI mode
bin/dispatcher --versionTo see the available commands, run the following command:
bin/dispatcher --helpTo interact with ChatGPT, use the chat command, for example:
bin/dispatcher chatWeb mode
then you can run it on tomcat server by running the following command:
sudo bin/dispatcher start --import org.tinystruct.system.TomcatServer --server-port 777or run it on netty http server by running the following command:
sudo bin/dispatcher start --import org.tinystruct.system.NettyHttpServer --server-port 777docker run -d -p 777:777 -e "OPENAI_API_KEY=[YOUR-OPENAI-API-KEY]" -e "STABILITY_API_KEY=[YOUR-STABILITY-API-KEY]" m0ver/smalltalkThe system uses SQLite for storage with the following schema:
CREATE TABLE document_fragments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
document_id VARCHAR(36) NOT NULL,
content TEXT NOT NULL,
fragment_index INTEGER NOT NULL,
file_path VARCHAR(255),
mime_type VARCHAR(50),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE document_embeddings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
fragment_id VARCHAR(100) NOT NULL,
embedding BLOB NOT NULL,
embedding_dimension INTEGER NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE chat_history (
id INTEGER PRIMARY KEY AUTOINCREMENT,
meeting_code VARCHAR(255) NOT NULL,
user_name VARCHAR(255),
message TEXT,
session_id VARCHAR(255),
message_type VARCHAR(50),
image_url TEXT,
created_at DATE DEFAULT CURRENT_DATE
);The document QA functionality is integrated in the Smalltalk application:
Documents can be uploaded through the Smalltalk interface. Supported file types include:
Simply ask questions in the chat interface. The system will automatically:
The system includes several test classes to verify functionality:
Run the tests using the provided batch file:
runtest.bat
This script will:
The system relies on the following key libraries:
A demonstration for the comet technology, without any websocket and support any web browser:
https://tinystruct.herokuapp.com/?q=talk
We welcome contributions to the smalltalk project. If you are interested in contributing, please read the CONTRIBUTING.md file for more information about the project's development process and coding standards.
smalltalk uses the OpenAI API to interact with the ChatGPT language model. We would like to thank OpenAI for providing this powerful tool to the community.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| Back | FazBrowse Home | New Git URL |