Skip to content

Commit

Permalink
Fix AutotitleConversationJob for Ollama (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlindsey authored Dec 20, 2024
1 parent 7a5c4fe commit ccefff2
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 @@ -7,7 +7,7 @@ class ConversationNotReady < StandardError; end

def perform(conversation_id)
@conversation = Conversation.find(conversation_id)
return false if @conversation.assistant.api_service.effective_token.blank? # should we use anthropic key if that's all the user has?
return false if @conversation.assistant.api_service.requires_token? && @conversation.assistant.api_service.effective_token.blank?

messages = @conversation.messages.ordered.limit(4)
raise ConversationNotReady if messages.empty?
Expand Down

0 comments on commit ccefff2

Please sign in to comment.