690604:1008 ADR-034-134 #04
This commit is contained in:
@@ -228,11 +228,21 @@ export const adminAiService = {
|
||||
|
||||
submitSandboxOcr: async (
|
||||
file: File,
|
||||
engineType: string = 'auto'
|
||||
engineType: string = 'auto',
|
||||
typhoonOptions?: { temperature?: number; topP?: number; repeatPenalty?: number }
|
||||
): Promise<{ requestPublicId: string; jobId: string; status: string }> => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
formData.append('engineType', engineType);
|
||||
if (typhoonOptions?.temperature !== undefined) {
|
||||
formData.append('temperature', String(typhoonOptions.temperature));
|
||||
}
|
||||
if (typhoonOptions?.topP !== undefined) {
|
||||
formData.append('topP', String(typhoonOptions.topP));
|
||||
}
|
||||
if (typhoonOptions?.repeatPenalty !== undefined) {
|
||||
formData.append('repeatPenalty', String(typhoonOptions.repeatPenalty));
|
||||
}
|
||||
const { data } = await api.post('/ai/admin/sandbox/ocr', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
|
||||
Reference in New Issue
Block a user