{"id":26158746,"url":"https://github.com/pottava/gemini-go-sample","last_synced_at":"2026-06-30T07:31:20.758Z","repository":{"id":270783852,"uuid":"911426589","full_name":"pottava/gemini-go-sample","owner":"pottava","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-02T01:27:25.000Z","size":479,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T10:59:57.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/pottava.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}},"created_at":"2025-01-03T01:57:24.000Z","updated_at":"2025-03-02T01:26:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ec207d3-631a-4454-be5d-4f12b3f34cec","html_url":"https://github.com/pottava/gemini-go-sample","commit_stats":null,"previous_names":["pottava/gemini-go-sample"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pottava/gemini-go-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Fgemini-go-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Fgemini-go-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Fgemini-go-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Fgemini-go-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pottava","download_url":"https://codeload.github.com/pottava/gemini-go-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pottava%2Fgemini-go-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34957626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"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":[],"created_at":"2025-03-11T11:00:00.799Z","updated_at":"2026-06-30T07:31:20.736Z","avatar_url":"https://github.com/pottava.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go 言語による Gemini アプリケーション\n\n## あいさつ\n\n```sh\nexport GOOGLE_CLOUD_PROJECT=$( gcloud config get-value project )\ngcloud auth application-default login\ngo run cmd/main.go\n```\n\n## プロンプト\n\n```sh\ngo run cmd/main.go prompt \"令和元年元旦生まれの子どもはいま何歳？\"\n```\n\n## 画像、動画、音声、PDF\n\nURI が拡張子で終わっているものは URI のみで OK、拡張子がないものは `--file-type` も指定が必要です。\n\n```sh\ngo run cmd/main.go prompt \\\n    -f \"https://storage.googleapis.com/cloud-samples-data/generative-ai/image/scones.jpg\" \\\n    \"この写真を説明してください\"\n```\n\n## REST API\n\nもし .proto の変更が必要なら、編集しつつコードを生成して実装\n\n```sh\nvi proto/gemini/v2/text.proto\nbuf lint proto\nbuf generate proto\n```\n\nAPI サーバを起動して\n\n```sh\ngo run api/main.go\n```\n\nリクエストを送信\n\n```sh\ncurl -iXPOST -H \"Content-Type: application/json\" \\\n    -d '{\"prompt\": \"この写真を説明してください\", \"file-uri\": \"https://storage.googleapis.com/cloud-samples-data/generative-ai/image/scones.jpg\"}' \\\n    http://localhost:8080/api/gemini.v2.GeminiService/Generate\n```\n\nもしくは Web UI からチャットを開始\n\n```sh\nopen http://localhost:8080\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpottava%2Fgemini-go-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpottava%2Fgemini-go-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpottava%2Fgemini-go-sample/lists"}