Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
content.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
13#pragma once
14
15#include <string>
16#include <vector>
17
18namespace entropic {
19
25enum class ContentPartType {
26 TEXT,
27 IMAGE,
28};
29
43 std::string text;
44 std::string image_path;
45 std::string image_url;
46 int width = 0;
47 int height = 0;
48};
49
57std::string extract_text(const std::vector<ContentPart>& parts);
58
66bool has_images(const std::vector<ContentPart>& parts);
67
68} // namespace entropic
Activate model on GPU (WARM → ACTIVE).
ContentPartType
Content part type discriminant.
Definition content.h:25
@ IMAGE
Image content (local path or data URI)
@ TEXT
Plain text content.
bool has_images(const std::vector< ContentPart > &parts)
Check if content parts contain any image parts.
Definition content.cpp:41
std::string extract_text(const std::vector< ContentPart > &parts)
Extract concatenated text from content parts.
Definition content.cpp:20
A single content part within a multimodal message.
Definition content.h:41
int height
Image height after preprocessing (0 = not yet processed)
Definition content.h:47
int width
Image width after preprocessing (0 = not yet processed)
Definition content.h:46
std::string image_path
Local file path (type == IMAGE)
Definition content.h:44
std::string text
Text content (type == TEXT)
Definition content.h:43
ContentPartType type
Part type discriminant.
Definition content.h:42
std::string image_url
URL or data URI (type == IMAGE)
Definition content.h:45