(workspaceId?: string | null)
| 264 | } |
| 265 | |
| 266 | async function getMistralApiKey(workspaceId?: string | null): Promise<string | null> { |
| 267 | if (workspaceId) { |
| 268 | const byokResult = await getBYOKKey(workspaceId, 'mistral') |
| 269 | if (byokResult) { |
| 270 | logger.info('Using workspace BYOK key for Mistral OCR') |
| 271 | return byokResult.apiKey |
| 272 | } |
| 273 | } |
| 274 | return env.MISTRAL_API_KEY || null |
| 275 | } |
| 276 | |
| 277 | async function parseDocument( |
| 278 | fileUrl: string, |
no test coverage detected