Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugins): ai-prompt-decorator-plugin #12336

Merged
merged 4 commits into from Jan 23, 2024
Merged

Conversation

tysoekong
Copy link
Contributor

Summary

This commit offers another plugin that extends the functionality of "AI Proxy" in #12207.

It adds an array of "llm/v1/chat" messages to either the front or end of a caller's chat history.

This allows for complex prompt-engineering on behalf of the caller.

This reason for its development, is that many of our users would like to set up specific prompt history, words, phrases, or otherwise more tightly control how an AI / LLM model is used, if being called via Kong, and this applies especially with the AI Proxy plugin that will simplify this process.

Checklist

@tysoekong tysoekong requested a review from flrgh January 12, 2024 08:20
@tysoekong tysoekong force-pushed the feat/ai_prompt_decorator_plugin branch from 0a5a902 to 589c885 Compare January 12, 2024 08:41
@tysoekong tysoekong force-pushed the feat/ai_prompt_decorator_plugin branch 2 times, most recently from 6dd30d9 to 57bcb60 Compare January 12, 2024 08:57
@github-actions github-actions bot added the chore Not part of the core functionality of kong, but still needed label Jan 12, 2024
@tysoekong tysoekong force-pushed the feat/ai_prompt_decorator_plugin branch from 57bcb60 to 47559cd Compare January 12, 2024 09:40
@flrgh
Copy link
Contributor

flrgh commented Jan 16, 2024

Couple notes, but this looks very close to merge-ready.

@RobSerafini RobSerafini requested a review from a team January 17, 2024 16:42
locao
locao previously requested changes Jan 18, 2024
Copy link
Contributor

@locao locao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are concerns about this plugin design.

@flrgh flrgh added this to the 3.6.0 milestone Jan 19, 2024
@flrgh flrgh added the cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee label Jan 19, 2024
@tysoekong tysoekong force-pushed the feat/ai_prompt_decorator_plugin branch from 47559cd to 31b798a Compare January 23, 2024 09:26
Copy link
Contributor

@flrgh flrgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix the plugin name in kong/plugins/ai-prompt-decorator/schema.lua, and then this is merge-ready 👍

@locao locao force-pushed the feat/ai_prompt_decorator_plugin branch from ff103db to ef8e055 Compare January 23, 2024 20:25
@locao locao merged commit e4031c3 into master Jan 23, 2024
23 checks passed
@locao locao deleted the feat/ai_prompt_decorator_plugin branch January 23, 2024 21:29
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee chore Not part of the core functionality of kong, but still needed schema-change-noteworthy size/XL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants