ingestImage method

Future<MemoryIngestResult> ingestImage({
  1. required String name,
  2. String? caption,
  3. Uint8List? data,
  4. String? mimeType,
  5. String? source,
  6. Map<String, String>? annotations,
  7. List<String>? namespace,
  8. MemoryIngestStrategy strategy = MemoryIngestStrategy.heuristic,
  9. String? llmModel,
  10. double? llmTemperature,
})

Implementation

Future<MemoryIngestResult> ingestImage({
  required String name,
  String? caption,
  Uint8List? data,
  String? mimeType,
  String? source,
  Map<String, String>? annotations,
  List<String>? namespace,
  MemoryIngestStrategy strategy = MemoryIngestStrategy.heuristic,
  String? llmModel,
  double? llmTemperature,
}) async {
  final response = await _invokeJson("ingest_image", {
    "name": name,
    "namespace": namespace,
    "caption": caption,
    "data_base64": data == null ? null : base64Encode(data),
    "mime_type": mimeType,
    "source": source,
    "annotations_json": annotations == null ? null : jsonEncode(annotations),
    "strategy": strategy.value,
    "llm_model": llmModel,
    "llm_temperature": llmTemperature,
  });
  return MemoryIngestResult.fromJson(response.json, operation: "ingest_image");
}