Skip to content

Commit d7a1e02

Browse files
committed
Don't use consts
1 parent 6398331 commit d7a1e02

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/openai/client/runs_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
MAX_PROMPT_TOKENS = 256
2-
MAX_COMPLETION_TOKENS = 16
3-
41
RSpec.describe OpenAI::Client do
2+
let(:max_prompt_tokens) { 256 }
3+
let(:max_completion_tokens) { 16 }
4+
55
describe "#runs" do
66
let(:thread_id) do
77
VCR.use_cassette("#{cassette} thread setup") do
@@ -24,8 +24,8 @@
2424
thread_id: thread_id,
2525
parameters: {
2626
assistant_id: assistant_id,
27-
max_prompt_tokens: MAX_PROMPT_TOKENS,
28-
max_completion_tokens: MAX_COMPLETION_TOKENS
27+
max_prompt_tokens: max_prompt_tokens,
28+
max_completion_tokens: max_completion_tokens
2929
}
3030
)["id"]
3131
end
@@ -69,8 +69,8 @@
6969
parameters: {
7070
assistant_id: assistant_id,
7171
stream: stream,
72-
max_prompt_tokens: MAX_PROMPT_TOKENS,
73-
max_completion_tokens: MAX_COMPLETION_TOKENS
72+
max_prompt_tokens: max_prompt_tokens,
73+
max_completion_tokens: max_completion_tokens
7474
}
7575
)
7676
end

0 commit comments

Comments
 (0)