Skip to content

Commit e6d2dc1

Browse files
committed
fix: lint fix & test addition
1 parent ae088f8 commit e6d2dc1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/openai/http.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def azure_uri(path)
9797

9898
# Remove the deployment to support assistants for azure
9999
if path.include?("/assistants") || path.include?("/threads")
100-
base = base.gsub(%r{/deployments/[^\/]+/},
100+
base = base.gsub(%r{/deployments/[^/]+/},
101101
"/")
102102
end
103103

spec/openai/client/http_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@
241241
end
242242

243243
context "with assistants" do
244-
let(:path) { "/assistants" }
244+
let(:path) { "/assistants/test_assistant_id" }
245245
let(:uri_base) { "https://custom-domain.openai.azure.com/openai/deployments/gpt-35-turbo" }
246-
it { expect(uri).to eq("https://custom-domain.openai.azure.com/openai/assistants?api-version=v1") }
246+
it { expect(uri).to eq("https://custom-domain.openai.azure.com/openai/assistants/test_assistant_id?api-version=v1") }
247247
end
248248
end
249249
end

0 commit comments

Comments
 (0)