Skip to content

Commit f33e969

Browse files
committed
Rubocop
1 parent 3046fa1 commit f33e969

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

lib/openai/runs.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ def retrieve(thread_id:, id:)
1313
end
1414

1515
def create(thread_id:, parameters: {}, query_parameters: {})
16-
@client.json_post(path: "/threads/#{thread_id}/runs", parameters: parameters, query_parameters: query_parameters)
16+
@client.json_post(path: "/threads/#{thread_id}/runs", parameters: parameters,
17+
query_parameters: query_parameters)
1718
end
1819

1920
def modify(id:, thread_id:, parameters: {})

spec/openai/client/assistant_file_search_spec.rb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
let(:thread_id) do
3030
VCR.use_cassette("#{cassette} thread setup") do
3131
OpenAI::Client.new.threads.create(parameters: {
32-
messages: [
33-
{ role: "user", content: "Give the description of a nociceptor as written in the given file." }
34-
]
35-
})["id"]
32+
messages: [
33+
{ role: "user",
34+
content: "Find the description of a nociceptor." }
35+
]
36+
})["id"]
3637
end
3738
end
3839
let(:assistant_id) do
@@ -49,7 +50,7 @@
4950
file_search: {
5051
vector_store_ids: [vector_store_id]
5152
}
52-
},
53+
}
5354
}
5455
)["id"]
5556
end
@@ -68,7 +69,9 @@
6869

6970
describe "#runs" do
7071
describe "#create" do
71-
let(:query_parameters) { { include: ["step_details.tool_calls[*].file_search.results[*].content"] } }
72+
let(:query_parameters) do
73+
{ include: ["step_details.tool_calls[*].file_search.results[*].content"] }
74+
end
7275

7376
it "includes the chunk(s) found in the file search" do
7477
VCR.use_cassette("#{cassette} step retrieve") do
@@ -94,7 +97,8 @@
9497
end
9598

9699
expect(
97-
result.dig("step_details", "tool_calls", 0, "file_search", "results", 0, "content", 0, "text")
100+
result.dig("step_details", "tool_calls", 0, "file_search", "results", 0, "content", 0,
101+
"text")
98102
).to include("Activation of the rapidly adapting Pacinian corpuscles")
99103
end
100104
end

0 commit comments

Comments
 (0)