Remove ChatGPT integration and stop generating social media snippets#39
Draft
etagwerker wants to merge 1 commit into
Draft
Remove ChatGPT integration and stop generating social media snippets#39etagwerker wants to merge 1 commit into
etagwerker wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the ChatGPT (OpenAI) integration and stops generating social media snippets when a
Linkis created.Why
We no longer want to depend on the OpenAI API or auto-generate snippets on
Linkcreation.Changes
ruby-openaidependency fromGemfile/Gemfile.lock.after_create :create_chat_gpt_snippetscallback and the OpenAI client/prompt code fromLink(create_chat_gpt_snippets,fetch_social_media_snippets,gpt_prompt). No moreOPEN_AI_ACCESS_TOKENusage.fetch_social_media_snippets(withverify_partial_doubles = true, stubbing a missing method would fail).Kept intentionally
The
SocialMediaSnippetmodel, 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.erbstill 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