HttpEmbeddings.h header
#include <ew/app/HttpEmbeddings.h>
Namespace ew::app
Functions
AiEmbeddingResponse ew::app::fetchEmbeddings(const AiSettings &settings, const std::vector< QString > &texts)
Fetches embeddings for texts from the configured embeddings endpoint (see AiSettings), reusing the chat API key, and returns the per-text vectors (in order) or an error. Self-contained and blocking – a private network manager plus a local event loop – so it is safe to call off the GUI thread. Returns an error without touching the network when embeddings are not configured, and an empty success for an empty texts. Provider-agnostic: any OpenAI-compatible /embeddings endpoint (hosted or local).