{"id":13642775,"url":"https://github.com/tinystruct/smalltalk","last_synced_at":"2025-04-20T21:31:29.173Z","repository":{"id":59137983,"uuid":"328687728","full_name":"tinystruct/smalltalk","owner":"tinystruct","description":"A tinystruct-based chat module which integrated with @OpenAI GPT-3 / 3.5-turbo / ChatGPT. @tinystruct","archived":false,"fork":false,"pushed_at":"2024-10-30T14:41:08.000Z","size":66432,"stargazers_count":346,"open_issues_count":5,"forks_count":54,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-30T15:35:17.435Z","etag":null,"topics":["chat-application","chatbot","chatgpt","gpt-3","gpt-3-5-turbo","gpt-35-turbo","gpt-4","gpt4","java","tinystruct"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinystruct.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-11T14:20:29.000Z","updated_at":"2024-10-30T14:43:18.000Z","dependencies_parsed_at":"2022-09-13T02:11:16.270Z","dependency_job_id":"45289e43-775e-4845-99bc-66414d6c457c","html_url":"https://github.com/tinystruct/smalltalk","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinystruct%2Fsmalltalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinystruct%2Fsmalltalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinystruct%2Fsmalltalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinystruct%2Fsmalltalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinystruct","download_url":"https://codeload.github.com/tinystruct/smalltalk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223839004,"owners_count":17211852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-application","chatbot","chatgpt","gpt-3","gpt-3-5-turbo","gpt-35-turbo","gpt-4","gpt4","java","tinystruct"],"created_at":"2024-08-02T01:01:36.098Z","updated_at":"2025-04-20T21:31:29.166Z","avatar_url":"https://github.com/tinystruct.png","language":"Java","readme":"\nsmalltalk\n==\nsmalltalk is a tinystruct-based project that provides instant messaging functionality, It allows users to send text and share images, documents, and other content. \nAlso, 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.\n\n[![Star History Chart](https://api.star-history.com/svg?repos=tinystruct/smalltalk\u0026type=Date)](https://star-history.com/#tinystruct/smalltalk\u0026Date)\n\nInstallation\n---\n1. Download the project from GitHub by clicking the \"Clone or download\" button, then selecting \"Download ZIP\".\n2. Extract the downloaded ZIP file to your local machine.\n3. If you used to use git, then you should execute the following command to instead of above steps:\n```bash\ngit clone https://github.com/tinystruct/smalltalk.git \n```  \n4. You will need to follow this [tutorial](https://openjdk.org/install/) to install the Java Development Kit (JDK 11+) on your computer first. If you choose to download and install it manually, please check it in this [OpenJDK Archive](https://jdk.java.net/archive/). And Java development environment such as Eclipse or IntelliJ IDEA is just better to have, not required.\n\nIf your current envirionment is using JDK 8, you can execute the below command to upgrade it quickly.\n```\nbin/openjdk-upgrade\n```\n5. Import the extracted / cloned project into your Java development environment.\n6. Go to `src/main/resources/application.properties` file and update the `openai.api_key` with your own key or set the environment variable `OPENAI_API_KEY` with your own key.\n7. Here is the last step for installation:\n```tcsh\n./mvnw compile\n```\n\nUsage\n---\nYou can run smalltalk in different ways:\n\nCLI mode\n1. Open a terminal and navigate to the project's root directory.\n2. To execute it in CLI mode, run the following command:\n```tcsh\nbin/dispatcher --version\n```\nTo see the available commands, run the following command:\n```tcsh\nbin/dispatcher --help\n```\nTo interact with ChatGPT, use the chat command, for example:\n```tcsh\nbin/dispatcher chat\n```\n![CLI](https://github.com/tinystruct/smalltalk/assets/3631818/b49bab05-0135-4383-b252-0ca9c011f6e8)\n\nWeb mode\n\n1. Run the project in a servlet container or in a HTTP server:\n2. To run it in a servlet container, you need to compile the project first:\n\nthen you can run it on tomcat server by running the following command:\n\n```tcsh\nsudo bin/dispatcher start --import org.tinystruct.system.TomcatServer --server-port 777\n```\nor run it on netty http server by running the following command:\n\n```tcsh\nsudo bin/dispatcher start --import org.tinystruct.system.NettyHttpServer --server-port 777\n```\n3. To run it in a Docker container, you can use the command below:\n\n```tcsh\ndocker run -d -p 777:777 -e \"OPENAI_API_KEY=[YOUR-OPENAI-API-KEY]\" -e \"STABILITY_API_KEY=[YOUR-STABILITY-API-KEY]\" m0ver/smalltalk\n```\n4. Access the application by navigating to http://localhost:777/?q=talk in your web browser\n5. If you want to talk with ChatGPT, please type @ChatGPT in your topic of the conversation when you set up the topic.\n\n![Web](https://github.com/tinystruct/smalltalk/assets/3631818/32e50145-a5be-41d6-9cea-5b25e76e9f1b)\n\n\u003cimg src=\"https://github.com/user-attachments/assets/32721443-b680-481b-b5ed-ae3c7e4c6908\" width=500 /\u003e\n\nDemonstration\n---\nA demonstration for the comet technology, without any websocket and support any web browser:\n\nhttps://tinystruct.herokuapp.com/?q=talk\n\nTroubleshooting\n---\n* If you encounter any problems during the installation or usage of the project, please check the project's documentation or build files for information about how to set up and run the project.\n* If you still have problems, please open an issue on GitHub or contact the project maintainers for help.\n\nContribution\n---\nWe 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.\n\nAcknowledgements\n---\nsmalltalk 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.\n\nLicense\n---\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","funding_links":[],"categories":["Chatbots","CLI tools","UIs"],"sub_categories":["Other","Command-line(shell) interface"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinystruct%2Fsmalltalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinystruct%2Fsmalltalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinystruct%2Fsmalltalk/lists"}