experimental library
Experimental TypeSafe features from Jev 1.14's "Danger Zone": images in a request, Box questions, and the switches that turn them on.
TypeSafe doesn't call these ready for production. The request format,
the answers and the limits can change between releases, and so can this
library, without a breaking version bump. Everything here is marked
@experimental; Dart 3.11 and later report each use as an
experimental_member_use warning, which you can turn off in
analysis_options.yaml.
import 'package:typesafe_ai_dart/experimental.dart';
import 'package:typesafe_ai_dart/typesafe_ai_dart.dart';
Classes
- Box
-
A question that finds one thing in an image, answered with the four edges
of a box around it. Takes no criteria: instructions name what to find
and in which image, such as "the coffee mug in
photo". - BoxAnswer
-
Answer to a
Boxquestion: the edges of a box around what its instructions describe, each a fraction of the image's size measured from the top-left corner. Multiply by the image's width or height in pixels to draw or crop it. - Image
-
A PNG or JPEG image to put wherever a request takes text: in
state, in a question'sinstructions, or in its criteria. The request uploads it once as a file part and the model sees the image where its reference is. - TextWithImages
-
Text with images inside it, such as "Is this the dog in
photo?" followed by a picture. Encodes as one string, each image replaced by its reference.
Enums
- DangerZone
-
Experimental API features that TypeSafe keeps off unless a request asks
for them with a
TypeSafe-Danger-Zone-*header. TypeSafe doesn't vouch for them in production, and may change or drop them between releases. - ImageFormat
- The image file formats the API accepts.