Robert Sinclair

Results 131 comments of Robert Sinclair

tested and working: ``` const data = JSON.stringify({ contents: [{ parts: [{ inlineData: { mimeType: mimeType, data: fileContent.toString('base64') } }, { text: 'Analyze this.' }, ], }, ], }); ```

$ node anal2.js woman_art1.jpg ``` The painting depicts a woman sitting at a cafe table, her gaze directed downwards, creating a sense of introspection. She is dressed in a vibrant...

the only restriction is that the payload can be 20971520 bytes maximum.

it seems to work with many more file types than the ones publicized :D $ node anal2.js ../spectrogram.html This HTML code creates a web page that visualizes audio input from...

> Great, thanks for sharing your finds! I'll let you know how my testing goes. it works! you can add it... only caveat: not all mime types are supported. and...

![image](https://github.com/user-attachments/assets/8487b901-80d5-4155-9e30-f1c5f6c7b733)

![image](https://github.com/user-attachments/assets/47e3af5e-a4e5-4a74-9517-12c041b9dc1f)

This one he messed up.. but the answer is almost right: ![image](https://github.com/user-attachments/assets/7d62ac53-b49b-41cb-96c3-cf5216778a1a)

Note: for files who don't have a known mime type or that are unaccepted, just use their ascii representation. If you pass them as application/* they will probably be refused....