dev: fix issue with prompt validation

This commit is contained in:
KernelDeimos 2024-12-12 09:51:32 -05:00
parent 5f37f7f48f
commit d4ca9d438c
2 changed files with 5 additions and 0 deletions

View File

@ -279,6 +279,7 @@ class AIChatService extends BaseService {
intended_service,
parameters
};
await svc_event.emit('ai.prompt.validate', event);
if ( ! event.allow ) {
test_mode = true;
}

View File

@ -65,6 +65,10 @@ class FakeChatService extends BaseService {
"output_tokens": 1
}
},
"usage": {
"input_tokens": 0,
"output_tokens": 1
},
"logprobs": null,
"finish_reason": "stop"
}