Skip to content

A Tangle Blueprint for spawning a cronjob that summarizes a discord channel every day.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

tangle-network/discord-summarizer-rig-blueprint

Repository files navigation

Discord Channel Summarizer Blueprint 🤖

📚 Overview

This Tangle Blueprint provides an automated Discord channel summarization service using Hyperbolic's AI cloud.

Blueprints are specifications for AVSs on the Tangle Network. An AVS is an off-chain service that runs arbitrary computations for a user-specified period of time.

This blueprint demonstrates how to create an automated AI-powered service that:

  • Listens to Discord channels
  • Aggregates messages over 24-hour periods
  • Generates AI summaries using Hyperbolic through Rig's client adapter
  • Posts results on-chain for verification and provenance

For more details, please refer to the project documentation.

🚀 Features

  • 🤖 Automated 24-hour channel summarization
  • 🔗 On-chain result verification
  • 🧠 AI-powered content summarization via Hyperbolic
  • ⚡ Easy operator registration and management
  • 📊 Transparent job execution tracking

📋 Prerequisites

Before you can run this project, you will need to have the following software installed on your machine:

  • Rust
  • Forge
  • Discord Bot Token
  • Hyperbolic API credentials
  • Access to Tangle Network (testnet)

You will also need to install cargo-tangle, our CLI tool for creating and deploying Tangle Blueprints:

To install the Tangle CLI, run the following command:

Supported on Linux, MacOS, and Windows (WSL2)

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tangle-network/gadget/releases/download/cargo-tangle-v0.1.2/cargo-tangle-installer.sh | sh

Or, if you prefer to install the CLI from crates.io:

cargo install cargo-tangle --force # to get the latest version.

⭐ Getting Started

  1. Clone the repository and install dependencies:
cargo build
  1. Configure environment variables:
cp .env.example .env
# Edit .env with your credentials:
# - DISCORD_TOKEN
# - HYPERBOLIC_API_KEY
# - TANGLE_WS_URL
  1. Deploy the blueprint to Tangle:
cargo tangle blueprint deploy

🛠️ Development

The blueprint consists of three main components:

  1. Smart Contract (HelloBlueprint.sol):

    • Handles operator registration
    • Processes job requests
    • Verifies and stores summarization results
  2. Service Implementation (lib.rs):

    • Defines the summarization job
    • Implements Discord message collection
    • Manages AI summarization calls
  3. Runner (main.rs):

    • Sets up the service context
    • Initializes event listeners
    • Manages the service lifecycle

📜 License

Licensed under either of

at your option.

📬 Feedback and Contributions

We welcome feedback and contributions to improve this blueprint. Please open an issue or submit a pull request on our GitHub repository. Please let us know if you fork this blueprint and extend it too!

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A Tangle Blueprint for spawning a cronjob that summarizes a discord channel every day.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published