Skip to content

Commit

Permalink
Update OpenAIWritter
Browse files Browse the repository at this point in the history
- Update prompt
- User newer LLM model
  • Loading branch information
MatheusRich committed Aug 30, 2024
1 parent 8d38833 commit 265919b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/gold_miner/blog_post/open_ai_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def give_title_to(gold_nugget)

def summarize(gold_nugget)
summary = ask_openai <<~PROMPT
Summarize the following markdown message without removing the author's blog link. Return the summary as markdown.
Summarize the following markdown message without removing the author's blog link.
Keep code examples and links, if any. Return the summary as markdown.
Message:
#{gold_nugget.as_conversation}
Expand All @@ -48,7 +49,7 @@ def summarize(gold_nugget)
def ask_openai(prompt)
response = @openai_client.chat(
parameters: {
model: "gpt-3.5-turbo",
model: "gpt-4o-mini",
messages: [{role: "user", content: prompt.strip}],
temperature: 0
}
Expand Down

0 comments on commit 265919b

Please sign in to comment.