{"id":13825702,"url":"https://github.com/danb27/chat-toolkit","last_synced_at":"2025-09-03T18:31:57.036Z","repository":{"id":145196718,"uuid":"610703872","full_name":"danb27/chat-toolkit","owner":"danb27","description":"Extensible package for creating machine learning powered chatbots.","archived":false,"fork":false,"pushed_at":"2023-03-21T19:16:17.000Z","size":238,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-21T00:58:47.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danb27.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-03-07T10:07:43.000Z","updated_at":"2024-01-29T20:48:22.000Z","dependencies_parsed_at":"2024-01-13T16:27:45.695Z","dependency_job_id":"d46ff41f-5d76-4751-a309-c4111694b8bc","html_url":"https://github.com/danb27/chat-toolkit","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/danb27/chat-toolkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb27%2Fchat-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb27%2Fchat-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb27%2Fchat-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb27%2Fchat-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danb27","download_url":"https://codeload.github.com/danb27/chat-toolkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danb27%2Fchat-toolkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273489828,"owners_count":25115031,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-08-04T09:01:25.587Z","updated_at":"2025-09-03T18:31:56.540Z","avatar_url":"https://github.com/danb27.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003c!-- TOC --\u003e\n* [Chat Toolkit](#chat-toolkit)\n  * [Installation](#installation)\n  * [Quick Usage](#quick-usage)\n  * [Components](#components)\n    * [Chatbots](#chatbots)\n    * [Speech to Text](#speech-to-text)\n    * [Text to Speech](#text-to-speech)\n  * [Orchestrator](#orchestrator)\n    * [Text to Text](#text-to-text)\n    * [Speech to Text](#speech-to-text-1)\n    * [Text to Speech](#text-to-speech-1)\n    * [Speech to Speech](#speech-to-speech)\n\u003c!-- TOC --\u003e\n\n# Chat Toolkit\n\nExtensible package for creating machine learning powered chatbots.\n\nPackage supports Linux and Windows. Mac is not explicitly supported, although it is possible some, or many parts of this will still work.\n\n**NOTE**: Some components require additional dependencies. See below for more information.\n\n## Installation\n\n`pip install -U chat-toolkit`\n\n## Quick Usage\n\nThe main script has been provided for convenience. This allows you to easily\nstart a conversation in your terminal.\n\nUsage:\n\n```\nusage: A script for quickly starting a conversation in your terminal. [-h] [--chatbot {chatgpt}]\n                                                                      [--speech-to-text [{whisper}]]\n                                                                      [--text-to-speech [{pyttsx3}]]\n\noptions:\n  -h, --help                        show this help message and exit\n  --chatbot {chatgpt}               Chatbot to use. Default: chatgpt.\n  --speech-to-text [{whisper}]      Speech to text model to use. Without additional arguments, defaults to whisper. Defaults to\n                                    None when argument is not present.\n  --text-to-speech [{pyttsx3}]      Text to speech model to use. Without additional arguments, defaults to pyttsx3. Defaults to\n                                    None when argument is not present.\n\n```\n\nTo quickly start up a Text to Text conversation (default models):\n\n`python -m chat_toolkit`\n\nTo quickly start up a Speech to Text conversation (default models):\n\n`python -m chat_toolkit --speech-to-text`\n\nTo quickly start up a Text to Speech conversation (default models):\n\n`python -m chat_toolkit --text-to-speech`\n\nTo quickly start up a Speech to Speech conversation (default models):\n\n`python -m chat_toolkit --speech-to-text --text-to-speech`\n\n## Components\n\nComponents are ML powered objects that accomplish tasks. Components should be\nable to estimate session costs. You can build your own components to use in\nisolation or as part of an orchestrator object.\n\n**NOTE**: Cost estimates are based on pricing rates provided by the user. Users\nshould do their own due dilligence and are responsible for their own costs and\nestimations.\n\n\u003e Advanced Usage: You can create your own component types by\n\u003e subclassing `chat_toolkit.base.ComponentBase`\n\n### Chatbots\n\nThese components send and receive text messages.\n\n| Class         | Requirements   | Model                   | Default Cost     | Reference                                                                    |\n|---------------|----------------|-------------------------|------------------|------------------------------------------------------------------------------|\n| OpenAIChatBot | OPENAI_API_KEY | gpt-3.5-turbo (ChatGPT) | $0.002/1k tokens | [OpenAI](https://platform.openai.com/docs/guides/chat/chat-completions-beta) |\n\nBasic Usage:\n\n```python\nfrom chat_toolkit import OpenAIChatBot\n\nchatbot = OpenAIChatBot()\nchatbot.prompt_chatbot(\"You are a butler named Jeeves.\")\nchatbot_response, _ = chatbot.send_message(\"Hello, what is your name?\")\n```\n\n\u003e Advanced Usage: You can create your own chatbot components by\n\u003e subclassing `chat_toolkit.base.ChatbotComponentBase`\n\n### Speech to Text\n\nThese components record speech and transform it into text.\n\n| Class              | Requirements                          | Model    | Default Cost     | Reference                                                                            |\n|--------------------|---------------------------------------|----------|------------------|--------------------------------------------------------------------------------------|\n| OpenAISpeechToText | OPENAI_API_KEY, libportaudio2 (linux) | whiper-1 | $0.006/1k tokens | [OpenAI](https://platform.openai.com/docs/guides/speech-to-text/speech-to-text-beta) |\n\nBasic Usage:\n\n```python\nfrom chat_toolkit import OpenAISpeechToText\n\nspeech_to_text = OpenAISpeechToText()\ntext, _ = speech_to_text.transcribe_speech()\n```\n\n**NOTE**: Recording quality is very sensitive to your hardware. Things can go wrong,\nfor example, if the input volume on your microphone is too loud.\n\n\u003e Advanced Usage: You can create your own speech to text components by\n\u003e subclassing `chat_toolkit.base.SpeechToTextComponentBase`\n\n### Text to Speech\n\nThese components say pieces of text.\n\n| ClassTextToSpeech   | Requirements   | Model  | Default Cost | Reference                                            |\n|---------------------|----------------|--------|--------------|------------------------------------------------------|\n| Pyttsx3TextToSpeech | espeak (linux) | n/a    | Free         | [Pyttsx3](https://pyttsx3.readthedocs.io/en/latest/) |\n\n**NOTE**: Pyttsx3TextToSpeech currently defaults to English, but it may be configured using `set_pyttsx3_property()` method. See pyttsx3's documentation for more information.\n\nBasic Usage:\n\n```python\nfrom chat_toolkit import Pyttsx3TextToSpeech\n\ntext_to_speech = Pyttsx3TextToSpeech()\ntext_to_speech.say_text(\"hello\")\n```\n\n\u003e Advanced Usage: You can create your own text to speech components by\n\u003e subclassing `chat_toolkit.base.TextToSpeechComponentBase`\n\n## Orchestrator\n\nThe Orchestrator class also allow you to chat from the terminal. The Orchestrator\nshould work such that you can replace any component with another of the\nsame type, or a custom-built one, and still be able to use the orchestrator.\n\n### Text to Text\n\nBasic usage:\n\n```python\nfrom chat_toolkit import OpenAIChatBot, Orchestrator\n\nchat = Orchestrator(OpenAIChatBot())\nchat.terminal_conversation()\n```\n\n### Speech to Text\n\nBasic usage:\n\n```python\nfrom chat_toolkit import OpenAIChatBot, OpenAISpeechToText, Orchestrator\n\nchat = Orchestrator(OpenAIChatBot(), OpenAISpeechToText())\nchat.terminal_conversation()\n```\n\n### Text to Speech\n\nBasic usage:\n\n```python\nfrom chat_toolkit import OpenAIChatBot, Orchestrator, Pyttsx3TextToSpeech\n\nchat = Orchestrator(OpenAIChatBot(), text_to_speech_component=Pyttsx3TextToSpeech())\nchat.terminal_conversation()\n```\n\n\n### Speech to Speech\n\nBasic usage:\n\n```python\nfrom chat_toolkit import OpenAIChatBot, OpenAISpeechToText, Orchestrator, Pyttsx3TextToSpeech\n\nchat = Orchestrator(OpenAIChatBot(), OpenAISpeechToText(), Pyttsx3TextToSpeech())\nchat.terminal_conversation()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanb27%2Fchat-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanb27%2Fchat-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanb27%2Fchat-toolkit/lists"}