{"id":30825984,"url":"https://github.com/nick-stebbings/rig_chatbot_project","last_synced_at":"2026-05-02T23:44:43.115Z","repository":{"id":313310228,"uuid":"1044745295","full_name":"nick-stebbings/rig_chatbot_project","owner":"nick-stebbings","description":"Accompanying code to AI chatbot project video","archived":false,"fork":false,"pushed_at":"2025-09-05T06:35:13.000Z","size":258,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-05T08:29:55.910Z","etag":null,"topics":["ai","android","chatbot","rig","tauri"],"latest_commit_sha":null,"homepage":"https://youtu.be/cTVgTs68woA","language":"Rust","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/nick-stebbings.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-26T06:33:48.000Z","updated_at":"2025-09-05T06:35:17.000Z","dependencies_parsed_at":"2025-09-05T08:30:01.296Z","dependency_job_id":"c83d5ca3-af8b-49b6-ae6f-dc378fdc13a5","html_url":"https://github.com/nick-stebbings/rig_chatbot_project","commit_stats":null,"previous_names":["nick-stebbings/rig_chatbot_project"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/nick-stebbings/rig_chatbot_project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-stebbings%2Frig_chatbot_project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-stebbings%2Frig_chatbot_project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-stebbings%2Frig_chatbot_project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-stebbings%2Frig_chatbot_project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nick-stebbings","download_url":"https://codeload.github.com/nick-stebbings/rig_chatbot_project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nick-stebbings%2Frig_chatbot_project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273906061,"owners_count":25188828,"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-06T02:00:13.247Z","response_time":2576,"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":["ai","android","chatbot","rig","tauri"],"created_at":"2025-09-06T12:38:32.141Z","updated_at":"2026-05-02T23:44:38.089Z","avatar_url":"https://github.com/nick-stebbings.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust AI Chatbot Tutorial: Parts 1 \u0026 2\n\nWelcome to the repository for Part 1 of my YouTube tutorial series on building a simple AI chatbot using Rust, Rig, and Tauri for Android.\n\nThis project is the starting point for our journey into creating a powerful, cross-platform AI application. In this first part, we focus on the fundamentals of interacting with an AI model using the `rig` crate in a Rust environment.\n\n## Part 1: Introduction to Rig\n\nIn this initial part of the tutorial, we cover the following:\n\n* **Setting up a new Rust project.**\n* **Integrating the `rig` crate** to connect to OpenAI's GPT-4o model.\n* **Creating a custom tool** for our AI agent to get the current time.\n* **Sending a prompt** to the agent and receiving a response.\n* **Basic project structure** and dependencies using Cargo.\n\n## Part 2: Tauri Mobile Setup\n\nIn this second part of the tutorial, we integrate the code from part 1 into a working Android app with UI.\n\n* **Setting up a new Tauri project.**\n* **Generating a UI** to connect to the agent in the backend.\n* **Wiring up the UI with event listeners** so that we can parse and render the stream of data from the agent.\n* **Sending events to/from the backend** so that our chatbot UI is fully integrated with the agent.\n* **Basic logging and passing environment variables** to debug pass through our API key.\n\n## Getting Started\n\nTo get this project running on your local machine, follow these steps:\n\n### Prerequisites\n\n* Make sure you have **Rust installed**. If not, you can install it from [rust-lang.org](https://www.rust-lang.org/).\n* You will need an **OpenAI API key**. You can get one from the [OpenAI Platform](https://platform.openai.com/).\n\n### Installation\n\n1.  **Clone the repository:**\n    ```sh\n    git clone \u003cyour-repo-url\u003e\n    cd \u003cyour-repo-directory\u003e\n    ```\n\n2.  **Set up your environment variables:**\n    You'll need to set the `OPENAI_API_KEY` environment variable. Open your terminal and use one of the following commands, depending on your operating system.\n\n    **For macOS and Linux:**\n    ```sh\n    export OPENAI_API_KEY='your-api-key-goes-here'\n    ```\n\n    **For Windows:**\n    ```sh\n    set OPENAI_API_KEY=your-api-key-goes-here\n    ```\n    Remember to replace `your-api-key-goes-here` with your actual OpenAI API key.\n\n3a.  **Run the project:**\n    ```sh\n    cargo run\n    ```\n\n3b.  **Run the project (Android version):**\n    ```sh\n    cargo tauri android dev\n    ```\n** Make sure to first set all environment variables and install all dependencies as mentioned in the video and the Tauri docs**\n\nYou should see the chatbot's response printed to the console.\n\n## Code Overview\n\nHere's a quick look at the key files in this project:\n\n* `src/main.rs`: This is the main entry point of our application. It sets up the OpenAI client, creates an agent, adds our custom tool, and sends a prompt to the model.\n* `src/tool.rs`: This file defines our custom `GetCurrentTime` tool. This tool allows the AI agent to get the current local time and use it in its responses.\n* `Cargo.toml`: This file contains the project's dependencies, including `rig-core`, `tokio`, and `chrono`.\n\n## What's Next?\n\nThis is just the beginning! In the next part of this series, we will:\n\n* **Part 3:** Implement more advanced **tool use with a simple MCP server**, allowing our chatbot to perform more complex tasks.\n\nStay tuned for the next videos in the series!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-stebbings%2Frig_chatbot_project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnick-stebbings%2Frig_chatbot_project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnick-stebbings%2Frig_chatbot_project/lists"}