Skip to content

Remove ChatGPT integration and stop generating social media snippets#39

Draft
etagwerker wants to merge 1 commit into
mainfrom
remove-chatgpt-integration
Draft

Remove ChatGPT integration and stop generating social media snippets#39
etagwerker wants to merge 1 commit into
mainfrom
remove-chatgpt-integration

Conversation

@etagwerker
Copy link
Copy Markdown
Member

What

Removes the ChatGPT (OpenAI) integration and stops generating social media snippets when a Link is created.

Why

We no longer want to depend on the OpenAI API or auto-generate snippets on Link creation.

Changes

  • Drop the ruby-openai dependency from Gemfile / Gemfile.lock.
  • Remove the after_create :create_chat_gpt_snippets callback and the OpenAI client/prompt code from Link (create_chat_gpt_snippets, fetch_social_media_snippets, gpt_prompt). No more OPEN_AI_ACCESS_TOKEN usage.
  • Update specs that stubbed the now-removed fetch_social_media_snippets (with verify_partial_doubles = true, stubbing a missing method would fail).

Kept intentionally

The SocialMediaSnippet model, its table, the association, and the show-page / JSON-API display of existing snippets are left intact, so previously generated records still render. The goal was to stop generating, not to delete existing data.

Notes

  • app/views/links/show.html.erb still tells users existing snippets "are created by Open AI." That copy is accurate for legacy records and only renders when snippets exist, so it was left as-is. Happy to reword or hide it if preferred.

Testing

  • bundle exec rspec — 54 examples, 0 failures.

🤖 Generated with Claude Code

Drop the ruby-openai dependency and the OpenAI-backed generation pipeline
on Link. Links no longer generate social media snippets on create; the
after_create callback and the OpenAI client/prompt code are removed.

The SocialMediaSnippet model, its table, and the display of any existing
snippets are kept intact, so previously generated records still render.

Specs that stubbed the now-removed fetch_social_media_snippets are
updated (verify_partial_doubles would otherwise fail on the missing
method).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant