Skip to content

Commit

Permalink
Update lib/oli/conversation/dialogue.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolás Cirio <nicolas.cirio@wyeworks.com>
  • Loading branch information
darrensiegel and nicocirio authored Nov 27, 2023
1 parent 1f45e74 commit 718d96c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/oli/conversation/dialogue.ex
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,7 @@ defmodule Oli.Conversation.Dialogue do
end

def should_summarize?(%__MODULE__{model: model} = dialog) do
total_usage = total_token_length(dialog)

if total_usage > Model.token_limit(model) * @token_usage_high_watermark do
true
else
false
end
total_token_length(dialog) > Model.token_limit(model) * @token_usage_high_watermark
end

def total_token_length(%__MODULE__{
Expand Down

0 comments on commit 718d96c

Please sign in to comment.