mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 09:06:19 +08:00
feat(server): audio transcription (#10733)
This commit is contained in:
@@ -697,6 +697,10 @@ export const USER_FRIENDLY_ERRORS = {
|
||||
type: 'action_forbidden',
|
||||
message: `Embedding feature not available, you may need to install pgvector extension to your database`,
|
||||
},
|
||||
copilot_transcription_job_exists: {
|
||||
type: 'bad_request',
|
||||
message: () => 'Transcription job already exists',
|
||||
},
|
||||
|
||||
// Quota & Limit errors
|
||||
blob_quota_exceeded: {
|
||||
|
||||
@@ -753,6 +753,12 @@ export class CopilotEmbeddingUnavailable extends UserFriendlyError {
|
||||
}
|
||||
}
|
||||
|
||||
export class CopilotTranscriptionJobExists extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('bad_request', 'copilot_transcription_job_exists', message);
|
||||
}
|
||||
}
|
||||
|
||||
export class BlobQuotaExceeded extends UserFriendlyError {
|
||||
constructor(message?: string) {
|
||||
super('quota_exceeded', 'blob_quota_exceeded', message);
|
||||
@@ -1000,6 +1006,7 @@ export enum ErrorNames {
|
||||
COPILOT_FAILED_TO_MODIFY_CONTEXT,
|
||||
COPILOT_FAILED_TO_MATCH_CONTEXT,
|
||||
COPILOT_EMBEDDING_UNAVAILABLE,
|
||||
COPILOT_TRANSCRIPTION_JOB_EXISTS,
|
||||
BLOB_QUOTA_EXCEEDED,
|
||||
STORAGE_QUOTA_EXCEEDED,
|
||||
MEMBER_QUOTA_EXCEEDED,
|
||||
|
||||
Reference in New Issue
Block a user