Skip to main content

VisionLanguageModel.h File

Public NEAT handle for LLiMa text and vision-language models. More...

Included Headers

#include "genai/GenAITypes.h" #include <filesystem> #include <memory> #include <string> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacegenai

Classes Index

classVisionLanguageModel

Description

Public NEAT handle for LLiMa text and vision-language models.

File Listing

The file content with the documentation metadata removed is:

1
5#pragma once
6
7#include "genai/GenAITypes.h"
8
9#include <filesystem>
10#include <memory>
11#include <string>
12#include <vector>
13
14#if defined(SIMA_WITH_OPENCV)
15#include <opencv2/core/mat.hpp>
16#endif
17
18namespace simaai::neat::genai {
19
21public:
22 explicit VisionLanguageModel(std::filesystem::path model_dir);
24
27
29 VisionLanguageModel& operator=(const VisionLanguageModel&) = delete;
30
31 bool accepts_image() const;
32 std::string model_id() const;
33 std::size_t cached_image_count() const;
34 bool encode(const Tensor& image);
35 bool encode(const std::vector<Tensor>& images);
36#if defined(SIMA_WITH_OPENCV)
37 bool encode(const cv::Mat& image);
38 bool encode(const std::vector<cv::Mat>& images);
39#endif
42
43private:
44 struct Impl;
45 std::shared_ptr<Impl> impl_;
46
47 friend class GenerationStream;
48};
49
50} // namespace simaai::neat::genai

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.