This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

opencrow: add openrouter api key

+24 -5
+24 -5
2configs/opencrow.nix
··· 33 33 ]; 34 34 }; 35 35 36 - clan.core.vars.generators.opencrow = { 36 + clan.core.vars.generators.opencrow-matrix = { 37 37 prompts.matrix-access-token = { 38 - description = "Matrix access token for @opencrow:lassul.us - register via synapse admin API using the registration_shared_secret"; 38 + description = "Matrix access token for @opencrow:lassul.us"; 39 39 type = "hidden"; 40 + persist = true; 40 41 }; 42 + }; 43 + 44 + clan.core.vars.generators.opencrow-openrouter = { 45 + prompts.openrouter-api-key = { 46 + description = "OpenRouter API key for opencrow - get from https://openrouter.ai/keys"; 47 + type = "hidden"; 48 + persist = true; 49 + }; 50 + }; 51 + 52 + clan.core.vars.generators.opencrow-env = { 53 + dependencies = [ 54 + "opencrow-matrix" 55 + "opencrow-openrouter" 56 + ]; 41 57 files."opencrow.env" = { }; 42 58 script = '' 43 59 cat > "$out/opencrow.env" << EOF 44 - OPENCROW_MATRIX_ACCESS_TOKEN=$(cat $prompts/matrix-access-token) 60 + OPENCROW_MATRIX_ACCESS_TOKEN=$(cat $in/opencrow-matrix/matrix-access-token) 61 + OPENROUTER_API_KEY=$(cat $in/opencrow-openrouter/openrouter-api-key) 45 62 EOF 46 63 ''; 47 64 }; ··· 71 88 OPENCROW_PI_WORKING_DIR = "/home/bot/opencrow"; 72 89 OPENCROW_PI_SKILLS = "${opencrow}/share/opencrow/skills/web"; 73 90 OPENCROW_PI_SKILLS_DIR = "/home/bot/skills"; 91 + OPENCROW_PI_PROVIDER = "openrouter"; 92 + OPENCROW_PI_MODEL = "openrouter/qwen/qwen-2.5-7b-instruct"; 74 93 OPENCROW_HEARTBEAT_INTERVAL = "10m"; 75 94 OPENCROW_SHOW_TOOL_CALLS = "1"; 76 - OPENCROW_SOUL_FILE = "${opencrow}/share/opencrow/SOUL.md"; 95 + OPENCROW_SOUL_FILE = "/home/bot/opencrow/SOUL.md"; 77 96 PI_CODING_AGENT_DIR = "/home/bot/opencrow/pi-agent"; 78 97 }; 79 98 80 99 serviceConfig = { 81 100 EnvironmentFile = [ 82 - config.clan.core.vars.generators.opencrow.files."opencrow.env".path 101 + config.clan.core.vars.generators.opencrow-env.files."opencrow.env".path 83 102 config.clan.core.vars.generators.mailserver-bot.files."mail.env".path 84 103 ]; 85 104 ExecStart = "${opencrow}/bin/opencrow";