| |
| |
|
|
| export const MODEL_CAPS = { |
| flash: { |
| vision: true, |
| imageMimes: ["image/jpeg", "image/png", "image/webp", "image/gif"], |
| docExts: ["pdf", "docx", "txt", "md", "csv", "json", "js", "ts", "py", "html", "css", "java", "c", "cpp"], |
| }, |
| pro: { |
| vision: false, |
| imageMimes: [], |
| docExts: ["pdf", "docx", "txt", "md", "csv", "json", "js", "ts", "py", "html", "css", "java", "c", "cpp"], |
| }, |
| }; |
|
|
| |
| export const MAX_FILE_BYTES = 8 * 1024 * 1024; |
|
|
| export function acceptString(model) { |
| const c = MODEL_CAPS[model] || MODEL_CAPS.flash; |
| const imgs = c.vision ? c.imageMimes : []; |
| const docs = c.docExts.map(e => "." + e); |
| return [...imgs, ...docs].join(","); |
| } |
|
|