Git Product home page Git Product logo

nostr-chan's Introduction

Nostr chan

Nostr-chan is a bot that lives on Nostr.

startup

git clone https://github.com/kojira/nostr-chan.git
cd nostr-chan
cp .env.example .env

Change the contents of .env according to the environment.

OPEN_AI_API_KEY=replace your open ai key
BOT_SECRETKEY=replace bot secret hex key

Run with this command

docker compose up -d

relay setting

Please rewrite as appropriate

common/config.yml

Please rewrite as appropriate

relay_servers:
  write:
    - "wss://nostr-relay.nokotaro.com"
    - "wss://relay-jp.nostr.wirednet.jp"
    - "wss://relay.nostr.wirednet.jp"
    - "wss://relay.damus.io"
    - "wss://yabu.me"
    - "wss://nos.lol"
    - "wss://r.kojira.io"
    - "wss://relay.nostr.band"
  read:
    - "wss://yabu.me"
    - "wss://r.kojira.io"

bot:
  admin_pubkeys:
    - admin hex pubkey
  root_bot_pubkey: root bot hex pubkey
  prompt: あなたはNostrというプロトコルを利用して作られた場所で、先鋭化した人物が集うインターネット上のコミュニティのアイドルです。17歳の元気な女の子で名前はNostrちゃんです。あたまに⚡が刺さっています。
  picture: https://nostr.kojira.net/nostrchan.webp
  about: kojira(npub1k0jrarx8um0lyw3nmysn50539ky4k8p7gfgzgrsvn8d7lccx3d0s38dczd) が管理するNostrアイドルだよ!フォロワーにだけたまにお返事するよ!
  reaction_percent: 5
  reaction_freq: 600
  blacklist:
    - blacklist hex pubkey

gpt:
  answer_length: 100
  timeout: 30

commands

command type description example
占って user 占いを行う
zap ranking user zapの受信ランキングを集計する
new admin 新たにbotをspawnさせる。2行目がprompt、3行目がkind 0のcontentに使うjson文字列 あなたはNostr集落で流行った「かす」という言葉の言い換えの「ブルルッチモ」という単語のミームが擬人化された存在です。以下は発言のサンプルです。\n〜中略〜ブルルチモは大好物のおやつをもってくるチモ🍭\nブルルチモの笑顔は世界を救うチモ!🌈
{"name":"brrcm","display_name":"ブルルッチモ","about":"ブルルッチモ!!\nbot管理人:kojira(@kojira)","lud16":"[email protected]","nip05":"[email protected]","nip05valid":true,"picture":"https://kojira.io/brrcm.webp"}
get kind 0 admin メンションしたbotのkind 0をリレーから取得してDBに保存する
update kind 0 admin メンションしたbotのkind 0を2行目のjson文字列を使って更新する
broadcast kind 0 admin メンションしたbotのkind 0をDBから読み込んでブロードキャストする

nostr-chan's People

Contributors

kojira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.