• Resolved Stefano Lissa

    (@satollo)


    Hi, using the php-ai-client on wp 7.0 beta5, I found a possible bug. In line 219, inside the withHistory() method, there is:

    $this->messages = array_merge($messages, $this->messages);

    but it should be:

    $this->messages = array_merge($this->messages, $messages);

    otherwise the new messages exhanged with the LLM are added on top of the sequence on not at the end. Changing the code I was able to correct the invalid behavior when multimessage LLM prompt is sent.

    Thank you, Stefano.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Thanks for reporting this bug. So it can be properly tracked, I recommend raising an issue at its GitHub repo. (free registration required)

    Thread Starter Stefano Lissa

    (@satollo)

    Hi, sorry, it is not a bug, the code using that method was calling it in the wrong way. Nothing to change! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.