mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
dev: fix issue with prompt validation
This commit is contained in:
parent
5f37f7f48f
commit
d4ca9d438c
@ -279,6 +279,7 @@ class AIChatService extends BaseService {
|
|||||||
intended_service,
|
intended_service,
|
||||||
parameters
|
parameters
|
||||||
};
|
};
|
||||||
|
await svc_event.emit('ai.prompt.validate', event);
|
||||||
if ( ! event.allow ) {
|
if ( ! event.allow ) {
|
||||||
test_mode = true;
|
test_mode = true;
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,10 @@ class FakeChatService extends BaseService {
|
|||||||
"output_tokens": 1
|
"output_tokens": 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"usage": {
|
||||||
|
"input_tokens": 0,
|
||||||
|
"output_tokens": 1
|
||||||
|
},
|
||||||
"logprobs": null,
|
"logprobs": null,
|
||||||
"finish_reason": "stop"
|
"finish_reason": "stop"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user