dosubot[bot] commented on issue #12532: URL: https://github.com/apache/apisix/issues/12532#issuecomment-3200000332
<!-- Answer --> The ai-prompt-decorator plugin is designed to prepend or append configured prompts to the messages array, but it does not automatically add user input history unless that history is already present in the incoming payload or explicitly configured. The plugin's code and documentation confirm that it simply inserts your configured system prompt before the existing messages and preserves the original user messages as they are, without merging or generating history on its own ([source](https://github.com/apache/apisix/blob/4dc0a067bab4e56a868fba2e1234e966a5526ebe/apisix/plugins/ai-prompt-decorator.lua), [docs](https://github.com/apache/apisix/blob/4dc0a067bab4e56a868fba2e1234e966a5526ebe/docs/en/latest/plugins/ai-prompt-decorator.md)). If you see historical user input being appended, it's likely coming from the payload sent to APISIX or from another plugin (like ai-proxy) that might be merging history. To isolate the issue, try sending a minimal payload and enabling only the ai-prompt-decorator plugin, then compare the request and resulting messages. If you want help analyzing a specific payload or configuration, feel free to share more details! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/68d4ae44-160e-4581-8fce-6069a7a5818e?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/68d4ae44-160e-4581-8fce-6069a7a5818e?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/68d4ae44-160e-4581-8fce-6069a7a5818e?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/68d4ae44-160e-4581-8fce-6069a7a5818e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/68d4ae44-160e-4581-8fce-6069a7a5818e?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/68d4ae44-160e-4581-8fce-6069a7a5818e?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/68d4ae44-160e-4581-8fce-6069a7a5818e?feedback_type=other)</sup> [](https://app.dosu.dev/6aff3395-54f4-4ca2-8624-021d21c2f031/ask?utm_source=githu b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/apisix/issues/12532) -- 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-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org