hw872715125 commented on issue #12532:
URL: https://github.com/apache/apisix/issues/12532#issuecomment-3200016503

   > 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!
   > 
   > _To reply, just mention [@dosu](https://go.dosu.dev/dosubot)._
   > 
   > 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)
  [![Chat with 
Dosu](https://camo.githubusercontent.com/d9ffebb979729c9ef0fc4e3090dbae5b17cabbfec8afe378ada6b81913d6ad8a/68747470733a2f2f646f73752e6465762f
 
646f73752d636861742d62616467652e737667)](https://app.dosu.dev/6aff3395-54f4-4ca2-8624-021d21c2f031/ask?utm_source=github)
 [![Join 
Discord](https://camo.githubusercontent.com/d562c2df5e4567ea41d37f1d91a4da0839d8341037045b103b2da268998de17f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465266c6162656c3d)](https://go.dosu.dev/discord-bot)
 [![Share on 
X](https://camo.githubusercontent.com/4649f705e2396d6f328dbc8e800a0509c9c17b3b20253b36706c393df124b93d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f582d73686172652d626c61636b)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/apisix/issues/12532)
   
   Please provide an example? For instance, the demo route.@dosu


-- 
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

Reply via email to