{"id":37746064,"url":"https://github.com/jaimeteb/chatto","last_synced_at":"2026-01-16T14:16:40.463Z","repository":{"id":52847176,"uuid":"273081420","full_name":"jaimeteb/chatto","owner":"jaimeteb","description":"Chatto is a minimal chatbot framework in Go.","archived":false,"fork":false,"pushed_at":"2023-05-26T12:05:43.000Z","size":57426,"stargazers_count":113,"open_issues_count":7,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-19T01:26:38.980Z","etag":null,"topics":["bot","bot-framework","chatbot","classifier","finite-state-machines","fsm","go","golang","naive-bayes-classifier"],"latest_commit_sha":null,"homepage":"https://chatto.jaimeteb.com","language":"Go","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/jaimeteb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.buymeacoffee.com/jaimeteb"]}},"created_at":"2020-06-17T21:25:50.000Z","updated_at":"2024-02-29T23:34:09.000Z","dependencies_parsed_at":"2024-06-19T01:15:12.137Z","dependency_job_id":null,"html_url":"https://github.com/jaimeteb/chatto","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/jaimeteb/chatto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimeteb%2Fchatto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimeteb%2Fchatto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimeteb%2Fchatto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimeteb%2Fchatto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaimeteb","download_url":"https://codeload.github.com/jaimeteb/chatto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimeteb%2Fchatto/sbom","scorecard":{"id":502302,"data":{"date":"2025-08-11","repo":{"name":"github.com/jaimeteb/chatto","commit":"0bba1604625548c9acd3c59f549d31d69fc275ff"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: docs/security.md:1","Info: Found linked content: docs/security.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: docs/security.md:1","Info: Found text in security policy: docs/security.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/firebase-hosting-merge.yml:1","Warn: no topLevel permission defined: .github/workflows/firebase-hosting-pull-request.yml:1","Warn: no topLevel permission defined: .github/workflows/golangci-lint.yml:1","Warn: no topLevel permission defined: .github/workflows/goreleaser-release.yml:1","Warn: no topLevel permission defined: .github/workflows/goreleaser-snapshot.yml:1","Warn: no topLevel permission defined: .github/workflows/unittest.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.9.2 not signed: https://api.github.com/repos/jaimeteb/chatto/releases/95514612","Warn: release artifact v0.9.1 not signed: https://api.github.com/repos/jaimeteb/chatto/releases/94974300","Warn: release artifact v0.9.0 not signed: https://api.github.com/repos/jaimeteb/chatto/releases/90586232","Warn: release artifact v0.8.6 not signed: https://api.github.com/repos/jaimeteb/chatto/releases/41560823","Warn: release artifact v0.8.5 not signed: https://api.github.com/repos/jaimeteb/chatto/releases/41382913","Warn: release artifact v0.9.2 does not have provenance: https://api.github.com/repos/jaimeteb/chatto/releases/95514612","Warn: release artifact v0.9.1 does not have provenance: https://api.github.com/repos/jaimeteb/chatto/releases/94974300","Warn: release artifact v0.9.0 does not have provenance: https://api.github.com/repos/jaimeteb/chatto/releases/90586232","Warn: release artifact v0.8.6 does not have provenance: https://api.github.com/repos/jaimeteb/chatto/releases/41560823","Warn: release artifact v0.8.5 does not have provenance: https://api.github.com/repos/jaimeteb/chatto/releases/41382913"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":0,"reason":"27 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2947 / GHSA-v6v8-xj6m-xwqh","Warn: Project is vulnerable to: GO-2024-2606 / GHSA-7jwh-3vrq-q3m8 / GHSA-mrww-27vc-gghv","Warn: Project is vulnerable to: GO-2024-2605 / GHSA-m7wr-2xf7-cm9p","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2021-0113 / GHSA-ppp9-7jff-5vj2","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/firebase-hosting-merge.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/firebase-hosting-merge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/firebase-hosting-merge.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/firebase-hosting-merge.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/firebase-hosting-merge.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/firebase-hosting-merge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/firebase-hosting-pull-request.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/firebase-hosting-pull-request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/firebase-hosting-pull-request.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/firebase-hosting-pull-request.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/firebase-hosting-pull-request.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/firebase-hosting-pull-request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/golangci-lint.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/golangci-lint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser-release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser-release.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser-release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser-release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser-release.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser-release.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser-release.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser-snapshot.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-snapshot.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser-snapshot.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-snapshot.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser-snapshot.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-snapshot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser-snapshot.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-snapshot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goreleaser-snapshot.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-snapshot.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goreleaser-snapshot.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/goreleaser-snapshot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unittest.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/unittest.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unittest.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/unittest.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unittest.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/unittest.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/unittest.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/jaimeteb/chatto/unittest.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: utils/docker-test/Dockerfile:1: pin your Docker image by updating golang:1.15-alpine to golang:1.15-alpine@sha256:b58c367d52e46cdedc25ec9cd74cadb14ad65e8db75b25e5ec117cdb227aa264","Warn: pipCommand not pinned by hash: .github/workflows/firebase-hosting-merge.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/firebase-hosting-pull-request.yml:27","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  11 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}}]},"last_synced_at":"2025-08-19T22:15:14.033Z","repository_id":52847176,"created_at":"2025-08-19T22:15:14.033Z","updated_at":"2025-08-19T22:15:14.033Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bot","bot-framework","chatbot","classifier","finite-state-machines","fsm","go","golang","naive-bayes-classifier"],"created_at":"2026-01-16T14:16:40.235Z","updated_at":"2026-01-16T14:16:40.452Z","avatar_url":"https://github.com/jaimeteb.png","language":"Go","readme":"[![Documentation](https://img.shields.io/static/v1?label=\u0026message=Documentation\u0026color=red)](https://chatto.jaimeteb.com)\n[![codecov](https://codecov.io/gh/jaimeteb/chatto/branch/master/graph/badge.svg)](https://codecov.io/gh/jaimeteb/chatto)\n[![Go Report Card](https://goreportcard.com/badge/github.com/jaimeteb/chatto)](https://goreportcard.com/report/github.com/jaimeteb/chatto)\n[![GoDoc](https://godoc.org/github.com/jaimeteb/chatto?status.svg)](https://godoc.org/github.com/jaimeteb/chatto)\n[![Docker Image Version (latest by date)](https://img.shields.io/docker/v/jaimeteb/chatto?color=teal\u0026sort=date)](https://hub.docker.com/repository/docker/jaimeteb/chatto)\n\n---\n# chatto\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/17936011/89082867-e3c0d300-d354-11ea-9def-008c403a4497.png\" alt=\"botto\" width=\"150\"/\u003e\n\u003c/p\u003e\n\nSimple chatbot framework written in Go, with configurations in YAML. The aim of this project is to create very simple text-based chatbots using a few configuration files.\n\nThe inspiration for this project originally came from [Flottbot](https://github.com/target/flottbot) and my experience using [Rasa](https://github.com/RasaHQ/rasa).\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://media.giphy.com/media/DFIxYClozxyMg9wnil/giphy.gif\" alt=\"demo\" width=\"480\"/\u003e\n\u003c/p\u003e\n\n## Contents\n\n* [Installation](#install)\n* [Documentation](#docs)\n* [Your first bot](#yourfirstbot)\n    * [The **clf.yml** file](#yourfirstbotclf)\n    * [The **fsm.yml** file](#yourfirstbotfsm)\n    * [Run your bot](#yourfirstbotrun)\n    * [Interact with your bot](#yourfirstbotinteract)\n* [Usage](#usage)  \n    * [CLI](#usagecli)\n    * [Docker Compose](#usagecompose)\n    * [Kubernetes](#usagekubernetes)\n    * [Import](#usageimport)\n* [Examples](#examples)  \n\n\u003ca name=\"install\"\u003e\u003c/a\u003e\n## Installation\n\n```\ngo get -u github.com/jaimeteb/chatto\n```\n\nVia Docker:\n\n```\ndocker pull jaimeteb/chatto:latest\n```\n\n\u003ca name=\"docs\"\u003e\u003c/a\u003e\n## Documentation\n\nSee the [**Documentation**](https://chatto.jaimeteb.com) for **examples**, **configuration guides** and **reference**.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/RkgEfX2.jpg\" href=\"https://chatto.jaimeteb.com\" alt=\"docs\"/\u003e\n\u003c/p\u003e\n\n\u003ca name=\"yourfirstbot\"\u003e\u003c/a\u003e\n## Your first bot\n\nChatto combines the consistency of a finite-state-machine with the flexibility of machine learning. It has three main components: the classifier, the finite-state-machine and the extensions.\n\nA very basic directory structure for Chatto would be the following:\n\n```\n.\n└──data\n   ├── clf.yml\n   └── fsm.yml\n```\n\nStart by creating the `data` directory as well as the YAML files.\n\n```console\nmkdir data\ntouch data/clf.yml data/fsm.yml\n```\n\n\u003ca name=\"yourfirstbotclf\"\u003e\u003c/a\u003e\n### The **clf.yml** file\n\nThe **clf.yml** file defines how the user messages will be classified into *commands* (intents). Start with this very simple configuration:\n\n```yaml\nclassification:\n  - command: \"turn_on\"\n    texts:\n      - \"turn on\"\n      - \"on\"\n\n  - command: \"turn_off\"\n    texts:\n      - \"turn off\"\n      - \"off\"\n```\n\n\u003ca name=\"yourfirstbotfsm\"\u003e\u003c/a\u003e\n### The **fsm.yml** file\n\nThe **fsm.yml** file defines the transitions between states, the commands that make these transitions, and the answers to be sent in them. Start with this file contents:\n\n```yaml\ntransitions:\n  - from:\n      - \"initial\"\n    into: \"on\"\n    command: \"turn_on\"\n    answers:\n      - text: \"Turning on.\"\n\n  - from:\n      - \"on\"\n    into: \"initial\"\n    command: \"turn_off\"\n    answers:\n      - text: \"Turning off.\"\n      - text: \"❌\"\n\ndefaults:\n  unknown: \"Can't do that.\"\n```\n\n\u003ca name=\"yourfirstbotrun\"\u003e\u003c/a\u003e\n### Run your first bot\n\nTo start your bot, run:\n\n```bash\nchatto --path data/\n```\n\nIf you're using Docker, run:\n\n```bash\ndocker run \\\n    -it \\\n    -e CHATTO_DATA=./data \\\n    -v $PWD/data:/data \\\n    jaimeteb/chatto:latest \\\n    chatto --path data\n```\n\n\u003ca name=\"yourfirstbotinteract\"\u003e\u003c/a\u003e\n### Interact with your first bot\n\nTo interact with your bot, run:\n\n```\nchatto cli\n```\n\nThat's it! Now you can say *turn on* or *on* to go into the **on** state, and *turn off* or *off* to go back into **initial**. However, you cannot go from **on** into **on**, or from **initial** into **initial** either.\n\nHere is a diagram for this simple Finite State Machine:\n\n![ON/OFF Finite State Machine](https://uploads.gamedev.net/monthly_06_2013/ccs-209764-0-84996300-1370053229.jpg)\n\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\n\u003e You can integrate your bot with [**Telegram, Twilio, Slack**](https://chatto.jaimeteb.com/channels/) and [**anything you like**](https://chatto.jaimeteb.com/endpoints/)\n\nRun `chatto` in the directory where your YAML files are located, or specify a path to them with the `--path` flag:\n\n```bash\nchatto --path ./your/data\n```\n\nTo run on Docker, use:\n\n```bash\ndocker run \\\n  -p 4770:4770 \\\n  -e CHATTO_DATA=./your/data \\\n  -v $PWD/your/data:/data \\\n  jaimeteb/chatto\n```\n\n\u003ca name=\"usagecli\"\u003e\u003c/a\u003e\n### CLI\n\nYou can use the Chatto CLI tool by downloading the `chatto cli` tool. The CLI makes it easy to test your bot interactions.\n\n```bash\nchatto cli --url 'http://mybot.com' -port 4770\n```\n\n\u003ca name=\"usagecompose\"\u003e\u003c/a\u003e\n### Docker Compose\n\nYou can use Chatto on Docker Compose as well. A `docker-compose.yml` would look like this:\n\n```yaml\nversion: \"3\"\n\nservices:\n  chatto:\n    image: jaimeteb/chatto:${CHATTO_VERSION}\n    env_file: .env\n    ports:\n      - \"4770:4770\"\n    volumes:\n      - ${CHATTO_DATA}:/data\n    depends_on:\n      - ext\n      - redis\n\n  ext:\n    image: odise/busybox-curl # Busy box with certificates\n    command: ext/ext\n    expose:\n      - 8770\n    volumes:\n      - ${CHATTO_DATA}/ext:/ext\n\n  redis:\n    image: bitnami/redis:6.0\n    environment:\n      - REDIS_PASSWORD=${STORE_PASSWORD}\n    expose:\n      - 6379\n```\n\nThis requires a `.env` file to contain the necessary environment variables:\n\n```\n# Chatto configuration\nCHATTO_VERSION=latest\nCHATTO_DATA=./your/data\n\n# Extension configuration\nCHATTO_BOT_EXTENSIONS_EXTENSION_NAME_URL=http://ext:8770\n\n# Redis\nCHATTO_BOT_STORE_HOST=redis\nCHATTO_BOT_STORE_PASSWORD=pass\n\n# Logs\nCHATTO_BOT_DEBUG=true\n```\n\nThe directory structure with all the files would look like this:\n\n```\n.\n├── data\n│   ├── ext\n│   │   ├── ext\n│   │   └── ext.go\n│   ├── bot.yml\n│   ├── chn.yml\n│   ├── clf.yml\n|   └── fsm.yml\n├── docker-compose.yml\n└── .env\n```\n\nFinally, run:\n\n```bash\ndocker-compose up -d redis ext\ndocker-compose up -d chatto\n```\n\n\u003e The [extensions](/extensions) server has to be executed according to its language.\u003cbr\u003e\u003cbr\u003eFor this `docker-compose.yml` file, you'd have to build the Go extension first:\u003cbr\u003e\u003cbr\u003e```go build -o data/ext/ext data/ext/ext.go```\n\n\u003e The [extensions](/extensions) server has to be running before Chatto initializes.\n\n\n\u003ca name=\"usagekubernetes\"\u003e\u003c/a\u003e\n### Kubernetes\n\nUnder the `deploy/kubernetes` directory you can find an example deployment:\n\n| Kind       | Name                    | Description                                                   |\n|------------|-------------------------|---------------------------------------------------------------|\n| Secret     | `chatto-config-secrets` | Contains the tokens that Chatto will use for authorization    |\n| ConfigMap  | `chatto-config-envs`    | Contains the environment variables for the **bot.yml** file   |\n| ConfigMap  | `chatto-config-files`   | Contains the **clf.yml** and **fsm.yml** file                 |\n| Deployment | `chatto`                | Chatto deployment based on the `jaimeteb/chatto` Docker image |\n| Service    | `chatto-service`        | Service for the `chatto` deployment                           |\n| Ingress    | `chatto-ingress`        | Ingress for the `chatto-service` service                      |\n\nRun the following command to deploy on Kubernetes:\n\n```bash\nkubectl apply -f ./deploy/kubernetes/\n```\n\n\u003ca name=\"usageimport\"\u003e\u003c/a\u003e\n### Import\n\nAn importable bot server and client package is provided to allow embedding into your own application.\n\nTo embed the server:\n\n```go\npackage main\n\nimport (\n\t\"flag\"\n\n\t\"github.com/jaimeteb/chatto/bot\"\n)\n\nfunc main() {\n\tport := flag.Int(\"port\", 4770, \"Specify port to use.\")\n\tpath := flag.String(\"path\", \".\", \"Path to YAML files.\")\n\tflag.Parse()\n\n\tserver := bot.NewServer(*path, *port)\n\n\tserver.Run()\n}\n```\n\nTo embed the client:\n\n```go\npackage myservice\n\nimport (\n\t\"log\"\n\n\t\"github.com/jaimeteb/chatto/bot\"\n)\n\ntype MyService struct {\n\tchatto bot.Client\n}\n\nfunc NewMyService(url string, port int) *MyService {\n\treturn \u0026MyService{chatto: bot.NewClient(url, port)}\n}\n\nfunc (s *MyService) Submit(question *query.Question) error {\n\tanswers, err := s.chatto.Submit(question)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Print answers to stdout\n\tfor _, answer := range answers {\n\t\tfmt.Println(answer.Text)\n\t}\n\n\treturn nil\n}\n```\n\n\u003ca name=\"examples\"\u003e\u003c/a\u003e\n## Examples\n\nI have provided some config files under *examples*. Clone the repository and run `chatto` with the `-path` of your desired example to test them out (for the ones that use extensions, run their respective extensions first).\n\nMore about these examples in the [**Documentation**](https://chatto.jaimeteb.com/examples/moodbot)\n\n1. [**Mood Bot**](/examples/01_moodbot) - A chatto version of [Rasa's Mood Bot](https://github.com/RasaHQ/rasa/tree/master/examples/moodbot) Greet the bot to start the conversation.\n2. [**Pokemon Search**](/examples/02_pokemon) - Search for Pokémon by name or number.\n3. [**Trivia Quiz**](/examples/03_trivia) - Type *start* to take a quick trivia quiz.\n","funding_links":["https://www.buymeacoffee.com/jaimeteb"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaimeteb%2Fchatto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaimeteb%2Fchatto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaimeteb%2Fchatto/lists"}