You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered a limitation in the Agncy class, specifically within the get_completion method. This method interacts with the Assistant API but does not currently support managing multiple threads effectively when several users interact with the same agency simultaneously.
The core of the issue lies in the inability to manage conversation threads and shared states uniquely for each user. This leads to potential conflicts or incorrect handling of state when multiple users interact with the agency concurrently.
Proposed Change:
I propose adding an enhancement to the get_completion method allowing it to accept a thread_id argument. This would enable:
Thread-specific interaction history management:
By passing a unique thread_id per user session, the library can maintain separate interaction histories, ensuring that responses and states are correctly handled on a per-user basis.
State management enhancement:
Alongside the thread management, modifying the shared state handling to be thread-specific would prevent users from affecting each other’s state during concurrent interactions.
Example:
Here's a simple example of how the enhanced method could be called: response = agency.get_completion(prompt="Hello, how can I assist you today?", thread_id=user_session_id)
The text was updated successfully, but these errors were encountered:
I have encountered a limitation in the
Agncy
class, specifically within theget_completion
method. This method interacts with the Assistant API but does not currently support managing multiple threads effectively when several users interact with the same agency simultaneously.The core of the issue lies in the inability to manage conversation threads and shared states uniquely for each user. This leads to potential conflicts or incorrect handling of state when multiple users interact with the agency concurrently.
Proposed Change:
I propose adding an enhancement to the
get_completion
method allowing it to accept athread_id
argument. This would enable:Thread-specific interaction history management:
By passing a unique
thread_id
per user session, the library can maintain separate interaction histories, ensuring that responses and states are correctly handled on a per-user basis.State management enhancement:
Alongside the thread management, modifying the shared state handling to be thread-specific would prevent users from affecting each other’s state during concurrent interactions.
Example:
Here's a simple example of how the enhanced method could be called:
response = agency.get_completion(prompt="Hello, how can I assist you today?", thread_id=user_session_id)
The text was updated successfully, but these errors were encountered: