Перейти к содержимому

Teach Your Code to See: Images in Jev 1.14 (Full Tutorial)

nononsenseai

0:00 / 0:00

Teach Your Code to See: Images in Jev 1.14 (Full Tutorial)

44 просмотра · 7 дн. назад
nononsenseai
10 подписчиков
44 просмотра · 7 дн. назад
Jev 1.14 can read images. In this tutorial we point it at a front door camera and ask in code: is there a person, what are they carrying, is it the same person as the staff badge, which gesture is this, and where is the mug? Every answer comes back typed, with a probability you can check in an if statement. New to Jev? Watch Part 1 first. I don't repeat the basics here (System One, state / model / questions, Choice / Score / Noul, probabilities, speed and pricing):    • Jev by TypeSafe AI: Typed AI Answers with ...   Code from this video: https://github.com/nononsense-ai/jev-... Link to blog: https://nononsensecode.dev/posts/jev-... Heads up: image support is marked experimental ("dreamer-ready") by TypeSafe AI. It is fine for prototypes, not for production yet, and the request format and answers can change between releases. What you will learn • The 4 rules for sending images: turn on the images header, wrap each picture in Image(), put shared images in the state once, keep names as plain text • Image limits: PNG or JPEG, 280 to 1568 px on each side, not animated • A fit() helper that makes any picture legal • Ask about one image (package or bag at the door) • Compare two images (door camera vs staff badge) • Use pictures as the options of a Choice question (thumbs up, open hand, none) • The new Box question: find an object, get four edges as fractions, crop it with Pillow • What the 400, 413, 422 and 429/529 errors mean 0:00 Jev 1.14 adds images 0:35 A warning: images are experimental 0:49 What we will build: a door camera 1:05 Project setup with uv 1:38 API key and .gitignore 2:00 Rule 1: turn on the images header 2:17 Rule 2: wrap pictures in Image() 2:28 Rule 3 and 4: share images once, plain-text names 3:03 Image size limits and the fit() helper 3:54 Example 1: one image, two questions (package and bag) 5:03 Example 2: compare two images 5:27 Example 3: images as options 6:13 Box: find the mug and crop it 7:22 When things go wrong 7:49 Recap 8:10 Thanks and what to build next #ai #llm #jev #typesafeai #python #programming #softwareengineering