#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
}
posted on 2025-07-05 09:58  北京开发  阅读(6)  评论(0)    收藏  举报