{"id":18457521,"url":"https://github.com/monorkin/witty","last_synced_at":"2025-04-22T23:19:01.949Z","repository":{"id":57672265,"uuid":"81980876","full_name":"monorkin/witty","owner":"monorkin","description":"wit.ai client library for Rust","archived":false,"fork":false,"pushed_at":"2017-11-15T08:41:01.000Z","size":54,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-22T23:19:00.802Z","etag":null,"topics":["api-client","nlp","rust","wit","witai"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/monorkin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-14T19:25:50.000Z","updated_at":"2017-11-15T08:50:33.000Z","dependencies_parsed_at":"2022-08-31T02:40:23.986Z","dependency_job_id":null,"html_url":"https://github.com/monorkin/witty","commit_stats":null,"previous_names":["stankec/witty"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monorkin%2Fwitty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monorkin%2Fwitty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monorkin%2Fwitty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monorkin%2Fwitty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monorkin","download_url":"https://codeload.github.com/monorkin/witty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250338007,"owners_count":21414112,"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":["api-client","nlp","rust","wit","witai"],"created_at":"2024-11-06T08:14:41.964Z","updated_at":"2025-04-22T23:19:01.919Z","avatar_url":"https://github.com/monorkin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Witty\n\nUnofficial [wit.ai](https://wit.ai/) client library for Rust.\n\n## Disclamer\n\nThis is an unofficial client implementation! It comes with no guarantees and\n[Wit.ai](https://wit.ai/) can't be held responsible for any bugs that may occure\nfrom using this library in your project.\n\nThis is a port of [Wit.ai's](https://wit.ai/) official\n[Ruby client](https://github.com/wit-ai/wit-ruby) to Rust\n\n## Notice\n\nWit.ai decided to close down their chat bot / conversation API on\n2018-01-01. This decision lead to the deprecation of the `run_actions` and\n`converse` methods.\n\nIn consequence, this library now only handles communication with Wit.ai servers.\n\nReference the [change log](CHANGELOG.md) for detailed explanations as to what\nhas been done to facilitate the transition.\n\n## Installation\n\nThis project is available on [Crates.io](https://crates.io/crates/witty), and\ncan be installed with `cargo`.\n\n```Cargo\n[dependencies]\nwitty = \"1.0.0\"\n```\n\n## Usage\n\nTo create a client you will need to get a token from [Wit.ai](https://wit.ai/).\n\n```Rust\nextern crate witty;\nuse witty::Value; # Serde JSON value struct\n\nfn main() {\n    let token = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\";\n    let client = witty::client(token);\n    let result = client.message(\"What's the weather like?\");\n\n    match result {\n        Ok(response) =\u003e println!(\"The server returns: {:?}\", response),\n        Err(error) =\u003e println!(\"Something went wrong... {:?}\", error)\n    };\n}\n```\n\n### Methods\n\nThe `Client` exposes a single method:\n\n#### message\n\nUsed to query the API for the meaning of an input message.\n\n```Rust\nmessage(\n  message: \u0026str\n) -\u003e Result\u003cValue, super::http::HttpError\u003e\n```\n\n* `message` - The input message which [wit.ai](https://wit.ai/) will process.\n\nThe returned value is the context with which the API responded.\n\n### Errors\n\nAll error structs contain a `message` and a `code` field. The `message` field is\nhuman-readable and describes the reason why this error occured alongside with\nany additional information gathered from the environment. The `code` field\nindicates where the error spawned and the class of issue it represents.\n\nThe following is a list of errors with their possible codes and\nexplanations:\n\n* _ExeccutionError_\n  * `102` - The API responded with an `error` type response.\n  * `105` - The API responded with an unknown type.\n  * `106` - There was a problem connecting to the API.\n\n* _HttpError_\n  * `100` - Unable to connect to server\n  * `101` - Server responded with message\n\n__Note:__ The `HttpError` struct also has an additional `status` field which\ncontains the response's HTTP status code. This code will also be displayed in\nthe message alongside with the canonical explanation.\n\n# License\n\nThis project is licensed under the [MIT license](LICENSE.txt). It's in no way\naffiliated with [Wit.ai](https://wit.ai/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonorkin%2Fwitty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonorkin%2Fwitty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonorkin%2Fwitty/lists"}