{"id":20622538,"url":"https://github.com/morgansundqvist/memosgpt","last_synced_at":"2025-07-27T17:11:17.947Z","repository":{"id":246683886,"uuid":"821847199","full_name":"morgansundqvist/memosgpt","owner":"morgansundqvist","description":"Webhook service for MEMOS note app which queries the OpenAI API and adds response as comment","archived":false,"fork":false,"pushed_at":"2024-06-29T16:18:39.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-06T23:26:47.574Z","etag":null,"topics":["golang","llm","memos","openai-api"],"latest_commit_sha":null,"homepage":"","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/morgansundqvist.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":"2024-06-29T15:52:27.000Z","updated_at":"2024-06-29T16:18:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"658b1ace-6a6f-468c-83d8-4c768615b95d","html_url":"https://github.com/morgansundqvist/memosgpt","commit_stats":null,"previous_names":["morgansundqvist/memosgpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/morgansundqvist/memosgpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morgansundqvist%2Fmemosgpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morgansundqvist%2Fmemosgpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morgansundqvist%2Fmemosgpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morgansundqvist%2Fmemosgpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/morgansundqvist","download_url":"https://codeload.github.com/morgansundqvist/memosgpt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/morgansundqvist%2Fmemosgpt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267392562,"owners_count":24079919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":["golang","llm","memos","openai-api"],"created_at":"2024-11-16T12:23:19.070Z","updated_at":"2025-07-27T17:11:17.922Z","avatar_url":"https://github.com/morgansundqvist.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MEMOSGPT\n\nThis project integrates MEMOS, an open-source note-taking service, with OpenAI's powerful language model. It listens for webhooks triggered by new and updated notes, scans for questions prefixed with `/g`, queries the OpenAI API, and posts the responses as comments on the original note.\n\n## Features\n\n- **Webhook Listener**: Automatically triggers on new notes added in MEMOS.\n- **Command Parsing**: Scans notes for the specific command `/g`.\n- **OpenAI Integration**: Utilizes OpenAI's language model to generate answers for parsed questions.\n- **Response Posting**: Automatically posts the generated answers back to the original note as a comment.\n\n## Prerequisites\n\n- Go (version 1.22.4 or newer)\n- MEMOS instance with webhook capability\n- OpenAI API key\n\n## Installation\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/morgansundqvist/memosgpt.git\n   cd memosgpt\n   ```\n\n2. **Set up your environment variables:**\n   Create a `.env` file in the project root and update it with your OpenAI API key and MEMOS webhook secret.\n\n   ```plaintext\n    OPENAI_API_KEY=\"your-openai-api-key-here\"\n    MEMOS_BASE_URL=\"http://localhost:5230\"\n    OPEN_AI_API_KEY=\"your-memos-api-key\"\n   ```\n\n3. **Build the project:**\n\n   ```bash\n   go build\n   ```\n\n4. **Run the service:**\n   ```bash\n   ./memosgpt\n   ```\n\n## Configuration\n\n- **Webhook Endpoint**: Ensure the webhook endpoint in MEMOS is set to the URL where this service is running, typically `http://your-ip:3214/wh`. Read more about webhooks in MEMOS here https://www.usememos.com/docs/advanced-settings/webhook\n\n## Usage\n\nOnce the service is up and running, it will listen for incoming webhooks from MEMOS. When a note containing the `/g \u003cquestion\u003e` syntax is detected, it will:\n\n1. Parse the question.\n2. Send it to the OpenAI API.\n3. Retrieve the response and post it back as a comment to the note.\n\nExample Note:\n\n```\nHere is a question about physics:\n/g What is the theory of relativity?\n```\n\n## Contributing\n\nContributions are welcome! If you'd like to improve the MEMOSGPT, please fork the repository and submit a pull request.\n\n## License\n\nDistributed under the MIT License.\n\n## Acknowledgments\n\n- [MEMOS](https://github.com/memos-org/memos) for the open-source note-taking platform.\n- [go-openai](https://pkg.go.dev/github.com/sashabaranov/go-openai) for providing the Golang client for OpenAI.\n- [grequests](https://github.com/levigross/grequests) for prividing a simple HTTP request package\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorgansundqvist%2Fmemosgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorgansundqvist%2Fmemosgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorgansundqvist%2Fmemosgpt/lists"}