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

   This is my test route configuration.
   curl "http://127.0.0.1:9180/apisix/admin/routes"; -X PUT \
     -H "X-API-KEY: ${admin_key}" \
     -d '{
       "id": "ai-chat-test",
       "uri": "/v1/chat/completions/t",
       "hosts": ["test.webber.com"],
       "methods": ["POST"],
       "plugins": {
         "ai-proxy": {
           "provider": "openai-compatible",
           "auth": {
             "header": {
               "Authorization": "Bearer '"${api_key}"'"
             }
           },
           "override": {
             "endpoint": 
"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions";
           },
           "timeout": 180000
         },
         "ai-prompt-decorator": {
           "prepend":[
             {
               "role": "system",
               "content": "task"
             }
           ]
         }
       }
     }'
   I sent the following messages one by one in the messages array: "How are 
you", "What are you doing now?", and "How many questions did I ask you in 
total, and what were they exactly?" — please note that these were not sent all 
at once in a single message. Please check my last test for details.
   
   <img width="779" height="497" alt="Image" 
src="https://github.com/user-attachments/assets/a34a7224-f647-4747-85cd-663931824760";
 />
   I called the API using Apifox, and the answer provided by the AI clearly 
indicates that, without including the user's historical messages in the 
`messages` array, the AI would have no way of knowing what I had asked before. 
However, I did not include any historical conversation messages when making the 
request in Apifox.
   @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