DocWire SDK
DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, document analysis. Offline processing possible for security and confidentiality
transcribe.h
1 /*********************************************************************************************************************************************/
2 /* DocWire SDK: Award-winning modern data processing in C++20. SourceForge Community Choice & Microsoft support. AI-driven processing. */
3 /* Supports nearly 100 data formats, including email boxes and OCR. Boost efficiency in text extraction, web data extraction, data mining, */
4 /* document analysis. Offline processing possible for security and confidentiality */
5 /* */
6 /* Copyright (c) SILVERCODERS Ltd, http://silvercoders.com */
7 /* Project homepage: https://github.com/docwire/docwire */
8 /* */
9 /* SPDX-License-Identifier: GPL-2.0-only OR LicenseRef-DocWire-Commercial */
10 /*********************************************************************************************************************************************/
11 
12 #ifndef DOCWIRE_TRANSCRIBE_H
13 #define DOCWIRE_TRANSCRIBE_H
14 
15 #include "chain_element.h"
16 #include "openai_export.h"
17 #include <string>
18 
19 namespace docwire
20 {
21 namespace openai
22 {
23 
24 class DOCWIRE_OPENAI_EXPORT Transcribe : public ChainElement, public with_pimpl<Transcribe>
25 {
26 public:
27  enum class Model
28  {
29  gpt_4o_transcribe, gpt_4o_mini_transcribe, whisper_1
30  };
31 
32  Transcribe(const std::string& api_key, Model model = Model::gpt_4o_transcribe);
33 
40  continuation operator()(message_ptr msg, const message_callbacks& emit_message) override;
41 
42  bool is_leaf() const override
43  {
44  return false;
45  }
46 
47 private:
49 };
50 
51 } // namespace openai
52 } // namespace docwire
53 
54 #endif //DOCWIRE_OPENAI_TRANSCRIBE_H
bool is_leaf() const override
Check if ChainElement is a leaf (last element which doesn't produce any messages)....
Definition: transcribe.h:42
continuation operator()(message_ptr msg, const message_callbacks &emit_message) override
Executes transform operation for given node data.
The main namespace for the DocWire SDK.
Definition: ai_elements.h:19