Gemini AI API with Image Input in Node JS Javascript Tutorial - Pro Vision Model

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • In this tutorial we will see how to input and send your image to gemini ai api using its pro vision model in node js javascript

Комментарии • 6

  • @prasadnakhate3189
    @prasadnakhate3189 3 месяца назад

    What if i dont want to keep the image in the same path?
    but fs.readFileSync takes up different path

    • @unitedtoptech6288
      @unitedtoptech6288  3 месяца назад

      you need to add the folder paths with the image name

  • @99.googolplex.percent
    @99.googolplex.percent 3 месяца назад

    Why everyone is trying to read the image from the disk directly? You can send URL which is a better option, obviously.

    • @unitedtoptech6288
      @unitedtoptech6288  3 месяца назад

      Yeah but what if you try uploading an image ? you won't be having url for that

    • @99.googolplex.percent
      @99.googolplex.percent 3 месяца назад

      @@unitedtoptech6288 Reading a file from memory either it's RAM or drive in server is not an option for me when it comes to production. For most applications, you'll likely need to store images either for historical reference or for other purposes. Assuming you'll use a database to store metadata about the files, like ownership information, you'll also need to upload them to a storage solution such as S3 or Cloud Storage. This allows you to upload the file to that storage and retrieve the URL instead of persisting the raw image/file data in the database and reading the file every time on the server. Keeping files on the server can lead to various issues, including performance drawbacks, especially if you're storing them in RAM, even with base64 encoding.

    • @unitedtoptech6288
      @unitedtoptech6288  3 месяца назад +1

      Wow! thanks for the info