diff --git a/server/src/nest/ai-connections/ai-connections.service.ts b/server/src/nest/ai-connections/ai-connections.service.ts index 29559aadf..7cdb241ba 100644 --- a/server/src/nest/ai-connections/ai-connections.service.ts +++ b/server/src/nest/ai-connections/ai-connections.service.ts @@ -195,6 +195,10 @@ export class AiConnectionsService implements SharedAiConnectionPort { return this.ownView(userId); } + /** + * Picks the model of the user's own connection, one the provider offers. + * @txIndependent reading the credential may renew a ChatGPT sign-in first; that write stands on its own. + */ async setOwnModel(userId: number, model: string): Promise { const row = await this.ownRow(userId); const models = await this.modelsOf(userId, row); diff --git a/server/src/nest/assistant/assistant.service.ts b/server/src/nest/assistant/assistant.service.ts index b9b0ccdb8..e0ad1c816 100644 --- a/server/src/nest/assistant/assistant.service.ts +++ b/server/src/nest/assistant/assistant.service.ts @@ -897,7 +897,10 @@ export class AssistantService { return new Map(categories.map((category): [number, string] => [category.id, category.name])); } - /** Where the loop keeps its steps: one row each, the chat turn's first one made already. */ + /** + * Where the loop keeps its steps: one row each, the chat turn's first one made already. + * @txIndependent each step is opened and saved on its own, with a provider's answer between them. + */ private stepStore(spec: TurnSpec): AgentStore { let first = spec.firstRowId; const fields = (step: StepRecord) => ({