Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 30e81ef

Browse files
committed
tests
1 parent 82d546e commit 30e81ef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

spec/lib/completions/dialects/dialect_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ def tokenizer
9999
end
100100

101101
it "limits the system message to 60% of available tokens" do
102-
prompt = DiscourseAi::Completions::Prompt.new("I'm a system message consisting of 10 tokens")
102+
prompt =
103+
DiscourseAi::Completions::Prompt.new("I'm a system message consisting of 10 tokens okay")
103104
prompt.push(type: :user, content: five_token_msg)
104105

105106
dialect = TestDialect.new(prompt, llm_model)
@@ -109,7 +110,7 @@ def tokenizer
109110

110111
expect(trimmed).to eq(
111112
[
112-
{ type: :system, content: "I'm a system message consisting of 10" },
113+
{ type: :system, content: "I'm a system message consisting of 10 tokens" },
113114
{ type: :user, content: five_token_msg },
114115
],
115116
)

spec/lib/completions/endpoints/open_ai_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def response(content, tool_call: false)
1818
model: "gpt-3.5-turbo-0301",
1919
usage: {
2020
prompt_tokens: 8,
21-
completion_tokens: 13,
21+
completion_tokens: 12,
2222
total_tokens: 499,
2323
},
2424
choices: [

0 commit comments

Comments
 (0)