Full C++23 framework tree: runtime, observability, security, data, app, realtime, supervisor, clients, CLI, example plus enterprise tenancy, audit, operability, governance, supplychain. Postgres via docker compose for tests.
27 lines
567 B
C++
27 lines
567 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "ai/ai_transport.hpp"
|
|
|
|
namespace molo::ai {
|
|
|
|
// Minimal blocking HTTP transport over POSIX sockets. Plain http:// only;
|
|
// https:// URLs fail with the marked TLS stub reason.
|
|
class SocketAiTransport : public IAiTransport {
|
|
public:
|
|
AiHttpResponse post_stream(const AiHttpRequest& request) override;
|
|
|
|
private:
|
|
struct ParsedUrl {
|
|
std::string host;
|
|
int port = 80;
|
|
std::string path;
|
|
bool https = false;
|
|
bool ok = false;
|
|
};
|
|
static ParsedUrl parse(const std::string& url);
|
|
};
|
|
|
|
} // namespace molo::ai
|