8000 Comment prompt adjustment by benhalpern · Pull Request #22030 · forem/forem · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Comment prompt adjustment #22030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8000 2 changes: 1 addition & 1 deletion app/services/ai/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Ai
class Base
include HTTParty
base_uri 'https://generativelanguage.googleapis.com/v1beta'
DEFAULT_MODEL = 'gemini-2.5-flash-preview-05-20'.freeze
DEFAULT_MODEL = 'gemini-2.5-pro-preview-06-05'.freeze
DEFAULT_KEY = ENV["GEMINI_API_KEY"].freeze
attr_reader :model
attr_reader :last_response
Expand Down
5 changes: 3 additions & 2 deletions app/services/ai/comment_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ def build_prompt

Here is the context:

1. **The Parent Content** (The post the comment was left on):
1. **The Parent Content Post** (The post the comment was left in reply to):
---
#{@comment.commentable.body_markdown.first(5_000)}
Title: #{@comment.commentable.title}
Body: #{@comment.commentable.body_markdown.first(5_000)}
---

2. **The User's Recent Comment History** (Their last 10 comments):
Expand Down
Loading
0