spacewander commented on code in PR #8149:
URL: https://github.com/apache/apisix/pull/8149#discussion_r1002701521


##########
apisix/plugins/ai.lua:
##########
@@ -19,10 +19,11 @@ local apisix          = require("apisix")
 local core            = require("apisix.core")
 local router          = require("apisix.router")
 local event           = require("apisix.core.event")
-local load_balancer   = require("apisix.balancer")
 local balancer        = require("ngx.balancer")
+local ngx             = ngx
 local is_http         = ngx.config.subsystem == "http"
 local enable_keepalive = balancer.enable_keepalive and is_http
+local is_apisix_or, response = pcall(require, "resty.apisix.response")

Review Comment:
   It is possible but not valuable to do this, as we don't want to support 
multiple versions of APISIX-Base, only support the latest APISIX-Base. Maybe a 
simple API to detect if apisix-base / openresty is used is enough.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to