Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Sep 18, 2024
1 parent 8f22cdb commit 4836c4d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,11 @@ install: runtime
$(ENV_INSTALL) -d $(ENV_INST_LUADIR)/apisix/plugins/ai-proxy/drivers
$(ENV_INSTALL) apisix/plugins/ai-proxy/drivers/*.lua $(ENV_INST_LUADIR)/apisix/plugins/ai-proxy/drivers

$(ENV_INSTALL) -d $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/embeddings
$(ENV_INSTALL) apisix/plugins/ai-rag/embeddings/*.lua $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/embeddings
$(ENV_INSTALL) -d $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/vector-search
$(ENV_INSTALL) apisix/plugins/ai-rag/vector-search/*.lua $(ENV_INST_LUADIR)/apisix/plugins/ai-rag/vector-search

$(ENV_INSTALL) bin/apisix $(ENV_INST_BINDIR)/apisix


Expand Down
2 changes: 1 addition & 1 deletion apisix/cli/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ local _M = {
max_size = 1048576
},
plugins = {
"ai-rag",
"real-ip",
"ai",
"client-control",
Expand Down Expand Up @@ -216,6 +215,7 @@ local _M = {
"body-transformer",
"ai-prompt-template",
"ai-prompt-decorator",
"ai-rag",
"proxy-mirror",
"proxy-rewrite",
"workflow",
Expand Down
1 change: 1 addition & 0 deletions apisix/plugins/ai-rag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ local ngx_req = ngx.req
local core = require("apisix.core")
local decorate = require("apisix.plugins.ai-prompt-decorator").__decorate
local next = next
local require = require

local azure_ai_search_schema = {
type = "object",
Expand Down
2 changes: 2 additions & 0 deletions apisix/plugins/ai-rag/embeddings/azure_openai.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
--
local core = require("apisix.core")
local internal_server_error = ngx.HTTP_INTERNAL_SERVER_ERROR
local type = type

local _M = {}


Expand Down
1 change: 1 addition & 0 deletions conf/config.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ plugins: # plugin list (sorted by priority)
- body-transformer # priority: 1080
- ai-prompt-template # priority: 1071
- ai-prompt-decorator # priority: 1070
- ai-rag # priority: 1060
- proxy-mirror # priority: 1010
- proxy-rewrite # priority: 1008
- workflow # priority: 1006
Expand Down
4 changes: 2 additions & 2 deletions t/plugin/ai-rag.t
Original file line number Diff line number Diff line change
Expand Up @@ -391,5 +391,5 @@ passed
POST /echo
{"ai_rag":{"vector_search":{"fields":"something"},"embeddings":{"input":"which service is good for devops"}}}
--- error_code: 200
--- response_body chomp
{"messages":[{"content":"passed","role":"user"}]}
--- response_body eval
qr/\{"messages":\[\{"content":"passed","role":"user"\}\]\}|\{"messages":\[\{"role":"user","content":"passed"\}\]\}/

0 comments on commit 4836c4d

Please sign in to comment.