You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "shreemaan-abhishek (via GitHub)" <gi...@apache.org> on 2024/08/20 16:56:01 UTC

[PR] feat: ai-prompt-decorator plugin [apisix]

shreemaan-abhishek opened a new pull request, #11515:
URL: https://github.com/apache/apisix/pull/11515

   ### Description
   
   coming soon
   
   Fixes # (issue)
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: ai-prompt-decorator plugin [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek merged PR #11515:
URL: https://github.com/apache/apisix/pull/11515


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: ai-prompt-decorator plugin [apisix]

Posted by "membphis (via GitHub)" <gi...@apache.org>.
membphis commented on code in PR #11515:
URL: https://github.com/apache/apisix/pull/11515#discussion_r1726422429


##########
apisix/plugins/ai-prompt-decorator.lua:
##########
@@ -0,0 +1,117 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core  = require("apisix.core")
+local ngx   = ngx
+local pairs = pairs
+
+
+local prompt_schema = {
+    properties = {
+        role = {
+            type = "string",
+            enum = { "system", "user", "assistant" }
+        },
+        content = {
+            type = "string",
+            minLength = 1,
+        }
+    },
+    required = { "role", "content" }
+}
+
+local prompts = {
+    type = "array",
+    items = prompt_schema
+}
+
+local schema = {
+    type = "object",
+    properties = {
+        prepend = prompts,
+        append = prompts,
+    },
+    anyOf = {
+        { required = { "prepend" } },
+        { required = { "append" } },
+        { required = { "append", "prepend" } },
+    },
+}
+
+
+local _M = {
+    version  = 0.1,
+    priority = 1070,
+    name     = "ai-prompt-decorator",
+    schema   = schema,
+}
+
+
+function _M.check_schema(conf)
+    return core.schema.check(schema, conf)
+end
+
+
+local function get_request_body_table()
+    local body, err = core.request.get_body()
+    if not body then
+        return nil, { message = "could not get body: " .. err }
+    end
+
+    local body_tab, err = core.json.decode(body)
+    if not body_tab then
+        return nil, { message = "could not get parse JSON request body: ", err }
+    end
+
+    return body_tab
+end
+
+
+local function decorate(conf, body_tab)
+    local new_messages = conf.prepend or {}
+    for _, message in pairs(body_tab.messages) do
+        core.table.insert_tail(new_messages, message)
+    end
+
+    for _, message in pairs(conf.append or {}) do
+        core.table.insert_tail(new_messages, message)
+    end
+
+    body_tab.messages = new_messages
+end
+
+
+function _M.rewrite(conf, ctx)
+    local body_tab, err = get_request_body_table()
+    if not body_tab then
+        return 400, err
+    end
+
+    if not body_tab.messages then
+        return 400, "messages missing from request body"
+    end
+    decorate(conf, body_tab) -- will decorate body_tab in place
+
+    local new_jbody, err = core.json.encode(body_tab)
+    if not new_jbody then
+        return 500, { message = "failed to parse modified JSON request body: ", err }

Review Comment:
   ditto 
   ```suggestion
           return 500, { message = "failed to parse modified JSON request body: " .. err }
   ```



##########
apisix/plugins/ai-prompt-decorator.lua:
##########
@@ -0,0 +1,117 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core  = require("apisix.core")
+local ngx   = ngx
+local pairs = pairs
+
+
+local prompt_schema = {
+    properties = {
+        role = {
+            type = "string",
+            enum = { "system", "user", "assistant" }
+        },
+        content = {
+            type = "string",
+            minLength = 1,
+        }
+    },
+    required = { "role", "content" }
+}
+
+local prompts = {
+    type = "array",
+    items = prompt_schema
+}
+
+local schema = {
+    type = "object",
+    properties = {
+        prepend = prompts,
+        append = prompts,
+    },
+    anyOf = {
+        { required = { "prepend" } },
+        { required = { "append" } },
+        { required = { "append", "prepend" } },
+    },
+}
+
+
+local _M = {
+    version  = 0.1,
+    priority = 1070,
+    name     = "ai-prompt-decorator",
+    schema   = schema,
+}
+
+
+function _M.check_schema(conf)
+    return core.schema.check(schema, conf)
+end
+
+
+local function get_request_body_table()
+    local body, err = core.request.get_body()
+    if not body then
+        return nil, { message = "could not get body: " .. err }
+    end
+
+    local body_tab, err = core.json.decode(body)
+    if not body_tab then
+        return nil, { message = "could not get parse JSON request body: ", err }

Review Comment:
   ```suggestion
           return nil, { message = "could not get parse JSON request body: " .. err }
   ```



##########
apisix/plugins/ai-prompt-decorator.lua:
##########
@@ -0,0 +1,117 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one or more
+-- contributor license agreements.  See the NOTICE file distributed with
+-- this work for additional information regarding copyright ownership.
+-- The ASF licenses this file to You under the Apache License, Version 2.0
+-- (the "License"); you may not use this file except in compliance with
+-- the License.  You may obtain a copy of the License at
+--
+--     http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+local core  = require("apisix.core")
+local ngx   = ngx
+local pairs = pairs
+
+
+local prompt_schema = {
+    properties = {
+        role = {
+            type = "string",
+            enum = { "system", "user", "assistant" }
+        },
+        content = {
+            type = "string",
+            minLength = 1,
+        }
+    },
+    required = { "role", "content" }
+}
+
+local prompts = {
+    type = "array",
+    items = prompt_schema
+}
+
+local schema = {
+    type = "object",
+    properties = {
+        prepend = prompts,
+        append = prompts,
+    },
+    anyOf = {
+        { required = { "prepend" } },
+        { required = { "append" } },
+        { required = { "append", "prepend" } },
+    },
+}
+
+
+local _M = {
+    version  = 0.1,
+    priority = 1070,
+    name     = "ai-prompt-decorator",
+    schema   = schema,
+}
+
+
+function _M.check_schema(conf)
+    return core.schema.check(schema, conf)
+end
+
+
+local function get_request_body_table()
+    local body, err = core.request.get_body()
+    if not body then
+        return nil, { message = "could not get body: " .. err }
+    end
+
+    local body_tab, err = core.json.decode(body)
+    if not body_tab then
+        return nil, { message = "could not get parse JSON request body: ", err }
+    end
+
+    return body_tab
+end
+
+
+local function decorate(conf, body_tab)
+    local new_messages = conf.prepend or {}

Review Comment:
   we can reuse this temporary table, eg: top level empty table



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: ai-prompt-decorator plugin [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #11515:
URL: https://github.com/apache/apisix/pull/11515#discussion_r1735454986


##########
docs/en/latest/plugins/ai-prompt-decorator.md:
##########
@@ -0,0 +1,112 @@
+---
+title: ai-prompt-decorator
+keywords:
+  - Apache APISIX
+  - API Gateway
+  - Plugin
+  - ai-prompt-decorator
+description: This document contains information about the Apache APISIX ai-prompt-decorator Plugin.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Description
+
+The `ai-prompt-decorator` plugin simplifies access to AI providers and models by appending or prepending
+prompts into the request.
+
+## Plugin Attributes
+
+| **Field**         | **Type** | **Description**                                     | **Required**    |
+| ----------------- | -------- | --------------------------------------------------- | --------------- |
+| `prepend`         | Array    | An array of prompt objects to be prepended          | Conditionally\* |
+| `prepend.role`    | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `prepend.content` | String   | Content of the message. Minimum length: 1           | Yes             |
+| `append`          | Array    | An array of prompt objects to be appended           | Conditionally\* |
+| `append.role`     | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `append.content`  | String   | Content of the message. Minimum length: 1           | Yes             |
+
+\* **Conditionally Required**: At least one of `prepend` or `append` must be provided.
+
+## Example usage
+
+Create a route with the `ai-prompt-decorator` plugin like so:
+
+```shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -X PUT \
+  -H "X-API-KEY: ${ADMIN_API_KEY}" \
+  -d '{
+    "uri": "/v1/chat/completions",
+    "plugins": {
+      "ai-prompt-decorator": {
+        "prepend":[
+          {
+            "role": "system",
+            "content": "I have exams tomorrow so explain conceptually and briefly"
+          }
+        ],
+        "append":[
+          {
+            "role": "system",
+            "content": "End the response with an analogy."
+          }
+        ]
+      }
+    },
+    "upstream": {
+      "type": "roundrobin",
+      "nodes": {
+        "api.openai.com:443": 1
+      },
+      "pass_host": "node",
+      "scheme": "https"
+    }
+  }'
+```
+
+The upstream node can be any arbitrary value because it won't be contacted.

Review Comment:
   whoops sorry this is a wrong info 😂. Good catch 🙏🏼 



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: ai-prompt-decorator plugin [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #11515:
URL: https://github.com/apache/apisix/pull/11515#discussion_r1735023687


##########
docs/en/latest/plugins/ai-prompt-decorator.md:
##########
@@ -0,0 +1,112 @@
+---
+title: ai-prompt-decorator
+keywords:
+  - Apache APISIX
+  - API Gateway
+  - Plugin
+  - ai-prompt-decorator
+description: This document contains information about the Apache APISIX ai-prompt-decorator Plugin.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Description
+
+The `ai-prompt-decorator` plugin simplifies access to AI providers and models by appending or prepending
+prompts into the request.
+
+## Plugin Attributes
+
+| **Field**         | **Type** | **Description**                                     | **Required**    |
+| ----------------- | -------- | --------------------------------------------------- | --------------- |
+| `prepend`         | Array    | An array of prompt objects to be prepended          | Conditionally\* |
+| `prepend.role`    | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `prepend.content` | String   | Content of the message. Minimum length: 1           | Yes             |
+| `append`          | Array    | An array of prompt objects to be appended           | Conditionally\* |
+| `append.role`     | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `append.content`  | String   | Content of the message. Minimum length: 1           | Yes             |
+
+\* **Conditionally Required**: At least one of `prepend` or `append` must be provided.
+
+## Example usage
+
+Create a route with the `ai-prompt-decorator` plugin like so:
+
+```shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -X PUT \
+  -H "X-API-KEY: ${ADMIN_API_KEY}" \
+  -d '{
+    "uri": "/v1/chat/completions",
+    "plugins": {
+      "ai-prompt-decorator": {
+        "prepend":[
+          {
+            "role": "system",
+            "content": "I have exams tomorrow so explain conceptually and briefly"
+          }
+        ],
+        "append":[
+          {
+            "role": "system",
+            "content": "End the response with an analogy."
+          }
+        ]
+      }
+    },
+    "upstream": {
+      "type": "roundrobin",
+      "nodes": {
+        "api.openai.com:443": 1
+      },
+      "pass_host": "node",
+      "scheme": "https"
+    }
+  }'
+```
+
+The upstream node can be any arbitrary value because it won't be contacted.

Review Comment:
   this is a key information so we should keep it, no?



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: ai-prompt-decorator plugin [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on PR #11515:
URL: https://github.com/apache/apisix/pull/11515#issuecomment-2312023227

   > This plugin should also be added to `config.yaml.example`.
   
   done


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: ai-prompt-decorator plugin [apisix]

Posted by "kayx23 (via GitHub)" <gi...@apache.org>.
kayx23 commented on code in PR #11515:
URL: https://github.com/apache/apisix/pull/11515#discussion_r1734017341


##########
docs/en/latest/plugins/ai-prompt-decorator.md:
##########
@@ -0,0 +1,112 @@
+---
+title: ai-prompt-decorator
+keywords:
+  - Apache APISIX
+  - API Gateway
+  - Plugin
+  - ai-prompt-decorator
+description: This document contains information about the Apache APISIX ai-prompt-decorator Plugin.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Description
+
+The `ai-prompt-decorator` plugin simplifies access to AI providers and models by appending or prepending
+prompts into the request.
+
+## Plugin Attributes
+
+| **Field**         | **Type** | **Description**                                     | **Required**    |
+| ----------------- | -------- | --------------------------------------------------- | --------------- |
+| `prepend`         | Array    | An array of prompt objects to be prepended          | Conditionally\* |
+| `prepend.role`    | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `prepend.content` | String   | Content of the message. Minimum length: 1           | Yes             |
+| `append`          | Array    | An array of prompt objects to be appended           | Conditionally\* |
+| `append.role`     | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `append.content`  | String   | Content of the message. Minimum length: 1           | Yes             |
+
+\* **Conditionally Required**: At least one of `prepend` or `append` must be provided.
+
+## Example usage
+
+Create a route with the `ai-prompt-decorator` plugin like so:
+
+```shell
+curl "http://127.0.0.1:9180/apisix/admin/routes/1" -X PUT \
+  -H "X-API-KEY: ${ADMIN_API_KEY}" \
+  -d '{
+    "uri": "/v1/chat/completions",
+    "plugins": {
+      "ai-prompt-decorator": {
+        "prepend":[
+          {
+            "role": "system",
+            "content": "I have exams tomorrow so explain conceptually and briefly"
+          }
+        ],
+        "append":[
+          {
+            "role": "system",
+            "content": "End the response with an analogy."
+          }
+        ]
+      }
+    },
+    "upstream": {
+      "type": "roundrobin",
+      "nodes": {
+        "api.openai.com:443": 1
+      },
+      "pass_host": "node",
+      "scheme": "https"
+    }
+  }'
+```
+
+The upstream node can be any arbitrary value because it won't be contacted.

Review Comment:
   I understand your intention but maybe remove this sentence 🤔 reads a bit confusing



##########
docs/en/latest/plugins/ai-prompt-decorator.md:
##########
@@ -0,0 +1,112 @@
+---
+title: ai-prompt-decorator
+keywords:
+  - Apache APISIX
+  - API Gateway
+  - Plugin
+  - ai-prompt-decorator
+description: This document contains information about the Apache APISIX ai-prompt-decorator Plugin.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Description
+
+The `ai-prompt-decorator` plugin simplifies access to AI providers and models by appending or prepending
+prompts into the request.
+
+## Plugin Attributes
+
+| **Field**         | **Type** | **Description**                                     | **Required**    |
+| ----------------- | -------- | --------------------------------------------------- | --------------- |
+| `prepend`         | Array    | An array of prompt objects to be prepended          | Conditionally\* |
+| `prepend.role`    | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `prepend.content` | String   | Content of the message. Minimum length: 1           | Yes             |
+| `append`          | Array    | An array of prompt objects to be appended           | Conditionally\* |
+| `append.role`     | String   | Role of the message (`system`, `user`, `assistant`) | Yes             |
+| `append.content`  | String   | Content of the message. Minimum length: 1           | Yes             |

Review Comment:
   Move the column to the front?
   
   <img width="818" alt="image" src="https://github.com/user-attachments/assets/b62f1031-3b11-4628-819d-735e11334234">
   



##########
docs/en/latest/plugins/ai-prompt-decorator.md:
##########
@@ -0,0 +1,112 @@
+---
+title: ai-prompt-decorator
+keywords:
+  - Apache APISIX
+  - API Gateway
+  - Plugin
+  - ai-prompt-decorator
+description: This document contains information about the Apache APISIX ai-prompt-decorator Plugin.
+---
+
+<!--
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+-->
+
+## Description
+
+The `ai-prompt-decorator` plugin simplifies access to AI providers and models by appending or prepending

Review Comment:
   ```suggestion
   The `ai-prompt-decorator` plugin simplifies access to LLM providers, such as OpenAI and Anthropic, and their models by appending or prepending
   ```



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: ai-prompt-decorator plugin [apisix]

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #11515:
URL: https://github.com/apache/apisix/pull/11515#discussion_r1735747576


##########
apisix/plugins/ai-prompt-template.lua:
##########
@@ -72,7 +72,7 @@ local schema = {
 
 local _M = {
     version  = 0.1,
-    priority = 1060,
+    priority = 1071,

Review Comment:
   `ai-prompt-decorator` plugin should run before `ai-prompt-decorator`



-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org