feat: ai-prompt-decorator plugin#11515
Merged
shreemaan-abhishek merged 13 commits intoAug 30, 2024
Merged
Conversation
shreemaan-abhishek
marked this pull request as ready for review
August 21, 2024 04:15
membphis
reviewed
Aug 22, 2024
|
|
||
| local body_tab, err = core.json.decode(body) | ||
| if not body_tab then | ||
| return nil, { message = "could not get parse JSON request body: ", err } |
Member
There was a problem hiding this comment.
Suggested change
| return nil, { message = "could not get parse JSON request body: ", err } | |
| return nil, { message = "could not get parse JSON request body: " .. err } |
|
|
||
|
|
||
| local function decorate(conf, body_tab) | ||
| local new_messages = conf.prepend or {} |
Member
There was a problem hiding this comment.
we can reuse this temporary table, eg: top level empty table
|
|
||
| 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 } |
Member
There was a problem hiding this comment.
ditto
Suggested change
| return 500, { message = "failed to parse modified JSON request body: ", err } | |
| return 500, { message = "failed to parse modified JSON request body: " .. err } |
bzp2010
self-requested a review
August 23, 2024 05:43
bzp2010
reviewed
Aug 27, 2024
bzp2010
left a comment
Contributor
There was a problem hiding this comment.
This plugin should also be added to config.yaml.example.
Contributor
Author
done |
bzp2010
previously approved these changes
Aug 27, 2024
kayx23
self-requested a review
August 28, 2024 05:09
kayx23
reviewed
Aug 28, 2024
moonming
previously approved these changes
Aug 28, 2024
shreemaan-abhishek
dismissed stale reviews from moonming and bzp2010
via
August 28, 2024 17:15
564c8bb
| local _M = { | ||
| version = 0.1, | ||
| priority = 1060, | ||
| priority = 1071, |
Contributor
Author
There was a problem hiding this comment.
ai-prompt-decorator plugin should run before ai-prompt-decorator
moonming
approved these changes
Aug 29, 2024
bzp2010
approved these changes
Aug 29, 2024
kayx23
approved these changes
Aug 30, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implement the prompt decorator plugin.
Checklist