Skip to content

Commit

Permalink
Hotfix: More durable parsing of conversation title
Browse files Browse the repository at this point in the history
  • Loading branch information
krschacht committed Aug 28, 2024
1 parent a15d47c commit 40479d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/jobs/autotitle_conversation_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def generate_title_for(text)
[text],
# response_format: { type: "json_object" }) this causes problems for Groq even though it's supported: https://console.groq.com/docs/api-reference#chat-create
)
JSON.parse(response).dig("topic")
response.scan(/(?<=:).+"(.+?)"/).flatten.first.strip
end

def system_message
Expand Down

0 comments on commit 40479d7

Please sign in to comment.