{"id":29820610,"url":"https://github.com/yuu61/kasu_uso","last_synced_at":"2026-05-16T13:04:24.456Z","repository":{"id":302071978,"uuid":"1010130181","full_name":"yuu61/kasu_uso","owner":"yuu61","description":"カスの嘘ジェネレーター","archived":false,"fork":false,"pushed_at":"2026-01-13T07:25:20.000Z","size":10576,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-13T07:52:05.597Z","etag":null,"topics":["blazor-server","csharp","nginx","openai-api"],"latest_commit_sha":null,"homepage":"https://www.tukushityann.net/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yuu61.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-06-28T12:10:55.000Z","updated_at":"2026-01-13T05:22:44.000Z","dependencies_parsed_at":"2025-12-04T13:03:43.947Z","dependency_job_id":null,"html_url":"https://github.com/yuu61/kasu_uso","commit_stats":null,"previous_names":["yuu61/kasu_uso"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yuu61/kasu_uso","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuu61%2Fkasu_uso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuu61%2Fkasu_uso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuu61%2Fkasu_uso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuu61%2Fkasu_uso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yuu61","download_url":"https://codeload.github.com/yuu61/kasu_uso/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yuu61%2Fkasu_uso/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33103971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blazor-server","csharp","nginx","openai-api"],"created_at":"2025-07-28T23:01:13.022Z","updated_at":"2026-05-16T13:04:24.444Z","avatar_url":"https://github.com/yuu61.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# [カスの嘘ジェネレータ (KasuUso Generator)](https://www.tukushityann.net/)\n\n[発表スライド](https://docs.google.com/presentation/d/1MfaHd2M6ElZcYaiWHERlNSd227NUAcXuGQxoyaVsacw/edit?usp=sharing)\n\n[Chat GPTに書かせたDeep Researchの結果](https://chatgpt.com/s/dr_68687bb085d08191a03f76d22054a73c)\n\n## 概要\n\n「カスの嘘ジェネレータ」は、OpenAI APIを使ってカスの嘘を生成する C#/.NET アプリケーションです  \n日常のちょっとした雑談やプレゼンのアクセント、SNS投稿ネタとして活用できます\n\n[カスの嘘 - Wikipedia](https://ja.wikipedia.org/wiki/%E3%83%80%E3%82%A6%E3%83%8A%E3%83%BC%E7%B3%BB%E3%81%8A%E5%A7%89%E3%81%95%E3%82%93%E3%81%AB%E6%AF%8E%E6%97%A5%E3%82%AB%E3%82%B9%E3%81%AE%E5%98%98%E3%82%92%E6%B5%81%E3%81%97%E8%BE%BC%E3%81%BE%E3%82%8C%E3%82%8B%E9%9F%B3%E5%A3%B0)\n\n## 主な機能\n\n- **カスタムプロンプト対応**：ユーザーが設定したテーマやキーワードに基づきカスの嘘を生成\n- **シンプルな UI** \u003c!--物は言いよう--\u003e ：Blazorベースの画面で入力→生成をワンストップ\n- **API キー管理**：ローカルファイル（`API_KEY.credential`）に格納したキーを自動読み込み\n- **OpenAI公式クライアント**：`OpenAI .NET` (ファーストパーティ) の非同期APIで快適なレスポンス\n- **Prometheusメトリクス**：セッション数、API呼び出し回数、パフォーマンス指標を収集\n\n## Prometheusメトリクス\n\nアプリケーションでは以下のメトリクスを収集しています：\n\n### セッション関連\n\n- `kasu_uso_active_sessions_total` - 現在のアクティブセッション数\n- `kasu_uso_sessions_total` - 総セッション数\n\n### OpenAI API関連\n\n- `kasu_uso_openai_api_calls_total` - OpenAI API呼び出し回数（ステータス・モデル別)\n- `kasu_uso_openai_api_duration_seconds` - OpenAI API応答時間\n- `kasu_uso_openai_api_errors_total` - OpenAI APIエラー回数（エラータイプ別）\n\n### ユーザー操作関連\n\n- `kasu_uso_messages_sent_total` - 送信されたメッセージ数\n- `kasu_uso_generate_button_clicks_total` - 生成ボタンクリック回数\n- `kasu_uso_month_selections_total` - 月選択回数（月別）\n- `kasu_uso_share_button_clicks_total` - シェアボタンクリック回数（プラットフォーム別）\n\n### パフォーマンス関連\n\n- `kasu_uso_page_load_duration_seconds` - ページ読み込み時間\n- `kasu_uso_errors_total` - アプリケーションエラー回数（エラータイプ別）\n\n### 標準HTTPメトリクス\n\n- `http_requests_total` - HTTPリクエスト総数\n- `http_request_duration_seconds` - HTTPリクエスト応答時間\n\n## 必要環境\n\n- [.NET 8.0 SDK](https://dotnet.microsoft.com/) 以上\n- C# 11.0\n- OpenAI API アクセス権（OpenAI API キー）\n- Windows/macOS/Linux 上のターミナルまたは**Visual Studio 2022**／Visual Studio Code\n\nVisual studioで動かすのが一番楽で速いと思います\u003cbr\u003e\nクローンしてAPIキー設定して`Ctrl + F5`するだけです\n\n## インストールとセットアップ\n\n以下に`Ubuntu 24.04 LTS`での手順を説明します\u003cbr\u003e\n誤りがある場合はよしなにしてください\u003cbr\u003e\n？？？「[ゆるしてよ～](https://youtu.be/jGWFDZ33UCU?si=eXK2HmKREVZIpQ3v)」\n\n1. リポジトリをクローン\n\n```\ngit clone https://github.com/yuu61/kasu_uso.git\ncd kasu_uso\n```\n\n3. .NETをインストール\n\n[.NET をインストールする](https://learn.microsoft.com/ja-jp/dotnet/core/install/)\n\n4. リポジトリのルートで以下コマンドを実行\n\n```\ndotnet publish -c Release\n#実行結果\nMSBuild version 17.8.27+3ab07f0cf for .NET\n  Determining projects to restore...\n  Restored /home/user/kasu_uso/kasu_uso.csproj (in 1.2 sec).\n  kasu_uso -\u003e /home/user/kasu_uso/bin/Release/net8.0/kasu_uso.dll\n  kasu_uso -\u003e /home/user/kasu_uso/bin/Release/net8.0/publish/\n```\n\n5. `sudo vi /etc/systemd/system/blazor-app.service`で以下のファイルを作成\u003cbr\u003euserの部分は`dotnet publish -c Release`の実行結果を参考に適宜書き換えてください\n\n```\n[Unit]\nDescription=Blazor Server App\nAfter=network.target\n\n[Service]\nWorkingDirectory=/home/user/kasu_uso/bin/Release/net8.0/publish\nExecStart=/usr/bin/dotnet /home/user/kasu_uso/bin/Release/net8.0/kasu_uso.dll\nRestart=always\nRestartSec=10\nUser=deploy\nEnvironment=ASPNETCORE_ENVIRONMENT=Production\nSyslogIdentifier=blazor-app\n\n[Install]\nWantedBy=multi-user.target\n```\n\n6. API キーの準備\n   `/kasu_uso/bin/Release/net8.0/publish`に`API_KEY.credential`ファイルを作成し、OpenAI APIキーを１行で記述します\n\n```\nsk-**************…\n```\n\n7. 実行\n\n```\nsudo systemctl daemon-reload\n# sudo systemctl enable blazor-app\nsudo systemctl start blazor-app\ndotnet run\n#実行結果\nuser@ubuntu:~/kasu_uso$ dotnet run\nビルドしています...\ninfo: Microsoft.Hosting.Lifetime[14]\n      Now listening on: http://localhost:xxxx\n```\n\n`https://localhost:xxxx`にブラウザでアクセスすると、UIが表示されます\n\n## カスタマイズ\n\n- **プロンプトの変更**  \n  `Home.razor` 内の `systemPrompt`や`userPrompt`を編集することで、生成されるカスの噓の傾向を調整できます\n  モデルの設定現在以下のようになっています\n\n```\nmodel = \"gpt-4.1-mini\",\nmax_output_token_count = 1000,\ntemperature = 1\n```\n\n- **UI の拡張**\n  Blazor コンポーネントを追加し、複数テーマ選択や生成履歴機能などを組み込むことも可能です\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuu61%2Fkasu_uso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyuu61%2Fkasu_uso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyuu61%2Fkasu_uso/lists"}