Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Feb 21, 2025
1 parent 104eea5 commit 40cf8d7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apisix/plugins/ai-drivers/deepseek.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-- limitations under the License.
--

return require("apisix.plugins.ai-proxy.drivers.openai-compatible").new(
return require("apisix.plugins.ai-drivers.openai-compatible").new(
{
host = "api.deepseek.com",
path = "/chat/completions",
Expand Down
2 changes: 1 addition & 1 deletion apisix/plugins/ai-drivers/openai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
-- limitations under the License.
--

return require("apisix.plugins.ai-proxy.drivers.openai-compatible").new(
return require("apisix.plugins.ai-drivers.openai-compatible").new(
{
host = "api.openai.com",
path = "/v1/chat/completions",
Expand Down
4 changes: 2 additions & 2 deletions apisix/plugins/ai-proxy-multi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ end

function _M.check_schema(conf)
for _, provider in ipairs(conf.providers) do
local ai_driver = pcall(require, "apisix.plugins.ai-proxy.drivers." .. provider.name)
local ai_driver = pcall(require, "apisix.plugins.ai-drivers." .. provider.name)
if not ai_driver then
return false, "provider: " .. provider.name .. " is not supported."
end
Expand Down Expand Up @@ -208,7 +208,7 @@ ai_proxy.proxy_request_to_llm = function (conf, request_table, ctx)
model_options = provider_conf.options,
}

local ai_driver = require("apisix.plugins.ai-proxy.drivers." .. provider)
local ai_driver = require("apisix.plugins.ai-drivers." .. provider)
local res, err, httpc = ai_driver:request(conf, request_table, extra_opts)
if not res then
if (ctx.balancer_try_count or 0) < 1 then
Expand Down
4 changes: 2 additions & 2 deletions apisix/plugins/ai-proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ local _M = {


function _M.check_schema(conf)
local ai_driver = pcall(require, "apisix.plugins.ai-proxy.drivers." .. conf.model.provider)
local ai_driver = pcall(require, "apisix.plugins.ai-drivers." .. conf.model.provider)
if not ai_driver then
return false, "provider: " .. conf.model.provider .. " is not supported."
end
Expand All @@ -60,7 +60,7 @@ end


function _M.proxy_request_to_llm(conf, request_table, ctx)
local ai_driver = require("apisix.plugins.ai-proxy.drivers." .. conf.model.provider)
local ai_driver = require("apisix.plugins.ai-drivers." .. conf.model.provider)
local extra_opts = {
endpoint = core.table.try_read_attr(conf, "override", "endpoint"),
query_params = conf.auth.query or {},
Expand Down

0 comments on commit 40cf8d7

Please sign in to comment.