Always create new thread in deep chat api

Created on 17 April 2025, 2 days ago

Problem/Motivation

AiAssistantApiRunner setAssistant method will check thread id is empty and create new thread.
set request thread id after setAssistant cause create new thread every request.

    // Set the assistant in the AiAssistantApiRunner.
    $this->aiAssistantClient->setAssistant($assistant);

    if (isset($data['stream']) && $data['stream'] === 1) {
      $this->aiAssistantClient->streamedOutput(TRUE);
    }

    // Optionally, set the thread_id if provided.
    if (isset($data['thread_id'])) {
      $this->aiAssistantClient->setThreadsKey($data['thread_id']);
    }

Steps to reproduce

Proposed resolution

move set request thread id before setAssistant

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

1.0

Component

Other Submodules

Created by

🇨🇳China ipumpkin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024