Skip to content

Commit 015cf18

Browse files
committed
fix: lint fix
1 parent 7124e46 commit 015cf18

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/openai/http.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,13 @@ def uri(path:)
9494

9595
def azure_uri(path)
9696
base = File.join(@uri_base, path)
97-
97+
9898
# Remove the deployment to support assistants for azure
99-
base = base.gsub(/\/deployments\/.+\//, '/') if (path.include?('/assistants') || path.include?('/threads'))
100-
99+
if path.include?("/assistants") || path.include?("/threads")
100+
base = base.gsub(%r{/deployments/.+/},
101+
"/")
102+
end
103+
101104
"#{base}?api-version=#{@api_version}"
102105
end
103106

0 commit comments

Comments
 (0)