mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
refactor: Unify streamId and conversationId handling for improved job management
- Updated ResumableAgentController and AgentController to generate conversationId upfront, ensuring it matches streamId for consistency. - Simplified job creation and metadata management by removing redundant conversationId updates from callbacks. - Refactored abortMiddleware and related methods to utilize the unified streamId/conversationId approach, enhancing clarity in job handling. - Removed deprecated methods from GenerationJobManager and InMemoryJobStore, streamlining the codebase and improving maintainability.
This commit is contained in:
parent
3a23badf5f
commit
8d34291f6a
6 changed files with 33 additions and 104 deletions
|
|
@ -89,12 +89,9 @@ export interface IJobStore {
|
|||
conversationId?: string,
|
||||
): Promise<SerializableJobData>;
|
||||
|
||||
/** Get a job by streamId */
|
||||
/** Get a job by streamId (streamId === conversationId) */
|
||||
getJob(streamId: string): Promise<SerializableJobData | null>;
|
||||
|
||||
/** Find active job by conversationId */
|
||||
getJobByConversation(conversationId: string): Promise<SerializableJobData | null>;
|
||||
|
||||
/** Update job data */
|
||||
updateJob(streamId: string, updates: Partial<SerializableJobData>): Promise<void>;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue