#include "docwire.h"
#include <cassert>
#include <sstream>
int main(int argc, char* argv[])
{
using namespace docwire
std::stringstream out_stream
try
{
std::filesystem::path("document_processing_market_trends.odt") | content_type::detector{} | office_formats_parser{} | PlainTextExporter() | openai::Classify({ "agreement", "invoice", "report", "legal", "other"}, std::getenv("OPENAI_API_KEY")) | out_stream
}
catch (const std::exception& e)
{
std::cerr << errors::diagnostic_message(e) << std::endl
return 1
}
assert(out_stream.str() == "report\n")
return 0
}
浙公网安备 33010602011771号