Skip to content

Commit

Permalink
fix: prettier&linter
Browse files Browse the repository at this point in the history
Signed-off-by: axel7083 <[email protected]>
  • Loading branch information
axel7083 committed Sep 10, 2024
1 parent 93ec5f5 commit eed8f54
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/backend/src/managers/playgroundV2Manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class PlaygroundV2Manager implements Disposable {
const conversation = this.#conversationRegistry.get(conversationId);
this.telemetry.logUsage('playground.delete', {
totalMessages: conversation.messages.length,
modelId: isAbsolute(conversation.modelId)?IMPORTED_PLACEHOLDER:conversation.modelId,
modelId: isAbsolute(conversation.modelId) ? IMPORTED_PLACEHOLDER : conversation.modelId,
});
this.#conversationRegistry.deleteConversation(conversationId);
}
Expand Down Expand Up @@ -153,10 +153,10 @@ export class PlaygroundV2Manager implements Disposable {
} as SystemPrompt);

const conversation = this.#conversationRegistry.get(conversationId);
if(!conversation) return;
if (!conversation) return;

this.telemetry.logUsage('playground.system-prompt.create', {
modelId: isAbsolute(conversation.modelId)?IMPORTED_PLACEHOLDER:conversation.modelId,
modelId: isAbsolute(conversation.modelId) ? IMPORTED_PLACEHOLDER : conversation.modelId,
});
}

Expand All @@ -172,7 +172,7 @@ export class PlaygroundV2Manager implements Disposable {
if (content === undefined || content.length === 0) {
this.#conversationRegistry.removeMessage(conversationId, conversation.messages[0].id);
this.telemetry.logUsage('playground.system-prompt.delete', {
modelId: isAbsolute(conversation.modelId)?IMPORTED_PLACEHOLDER:conversation.modelId,
modelId: isAbsolute(conversation.modelId) ? IMPORTED_PLACEHOLDER : conversation.modelId,
});
return;
}
Expand All @@ -184,7 +184,7 @@ export class PlaygroundV2Manager implements Disposable {
content,
});
this.telemetry.logUsage('playground.system-prompt.update', {
modelId: isAbsolute(conversation.modelId)?IMPORTED_PLACEHOLDER:conversation.modelId,
modelId: isAbsolute(conversation.modelId) ? IMPORTED_PLACEHOLDER : conversation.modelId,
});
} else {
throw new Error('Cannot change system prompt on started conversation.');
Expand Down Expand Up @@ -318,7 +318,7 @@ export class PlaygroundV2Manager implements Disposable {
this.#conversationRegistry.completeMessage(conversationId, messageId);
this.telemetry.logUsage('playground.message.complete', {
duration: Date.now() - start,
modelId: isAbsolute(conversation.modelId)?IMPORTED_PLACEHOLDER:conversation.modelId,
modelId: isAbsolute(conversation.modelId) ? IMPORTED_PLACEHOLDER : conversation.modelId,
});
}

Expand Down

0 comments on commit eed8f54

Please sign in to comment.