ingestImage method
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,
})
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");
}