Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0201b93

Browse filesBrowse files
committed
fix: redundant report-usage call in FakeChatService
1 parent d0edb2c commit 0201b93
Copy full SHA for 0201b93

File tree

Expand file treeCollapse file tree

1 file changed

+0
-15
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+0
-15
lines changed

‎src/backend/src/modules/puterai/FakeChatService.js

Copy file name to clipboardExpand all lines: src/backend/src/modules/puterai/FakeChatService.js
-15Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -163,21 +163,6 @@ class FakeChatService extends BaseService {
163163
"output_tokens": usedModel === 'costly' ? outputTokens : 1
164164
};
165165

166-
// Emit an event to report usage for the costly model
167-
if (usedModel === 'costly') {
168-
try {
169-
const svc_event = this.services.get('event');
170-
svc_event.emit('ai.prompt.report-usage', {
171-
actor: this.context?.actor,
172-
service_used: 'fake-chat',
173-
model_used: 'costly',
174-
usage: usage
175-
});
176-
} catch (error) {
177-
this.log.error('Failed to report usage', error);
178-
}
179-
}
180-
181166
return {
182167
"index": 0,
183168
message: {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.