Entropic 2.3.8
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
24enum class ContentPartType {
25 TEXT,
26 IMAGE,
27};
28
41 std::string text;
42 std::string image_path;
43 std::string image_url;
44 int width = 0;
45 int height = 0;
46};
47
54std::string extract_text(const std::vector<ContentPart>& parts);
55
62bool has_images(const std::vector<ContentPart>& parts);
63
64} // namespace entropic
Activate model on GPU (WARM → ACTIVE).
ContentPartType
Content part type discriminant.
Definition content.h:24
@ 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:39
int height
Image height after preprocessing (0 = not yet processed)
Definition content.h:45
int width
Image width after preprocessing (0 = not yet processed)
Definition content.h:44
std::string image_path
Local file path (type == IMAGE)
Definition content.h:42
std::string text
Text content (type == TEXT)
Definition content.h:41
ContentPartType type
Part type discriminant.
Definition content.h:40
std::string image_url
URL or data URI (type == IMAGE)
Definition content.h:43