Files

46 lines
2.5 KiB
C++
Raw Permalink Normal View History

#pragma once
// LLM vendor platform demos (xAI, Anthropic, Meta, DeepSeek). One register
// function per work package, each in its own file under example/app/ai/.
// Every route lives under /ai/<vendor> and is excluded from locust (paid
// APIs). Rules for a demo:
// - GET pages and status routes answer 2xx without credentials (the matrix
// test crawls them); a route that would call the vendor is POST or DELETE
// and answers 503 not_configured without a credential, 422 on bad input,
// and costly or destructive ones are dry runs unless the body has
// "confirm":true.
// - State lives in objects created inside the register function and
// captured by the handlers; do not edit Services.
// - Clients come from llm::ApiClient::from_env(...) (null key is fine: the
// vendor service then reports not configured).
#include "App.hpp"
namespace molo::example::app {
void register_ai_xai_demo(fw::Router& router, Services& services);
void register_ai_xaiplatform_demo(fw::Router& router, Services& services);
void register_ai_anthropic_demo(fw::Router& router, Services& services);
void register_ai_anthropicadmin_demo(fw::Router& router, Services& services);
void register_ai_meta_demo(fw::Router& router, Services& services);
void register_ai_deepseek_demo(fw::Router& router, Services& services);
void register_ai_openai_demo(fw::Router& router, Services& services);
void register_ai_openaiplatform_demo(fw::Router& router, Services& services);
void register_ai_openaiadmin_demo(fw::Router& router, Services& services);
void register_ai_openrouter_demo(fw::Router& router, Services& services);
void register_ai_compat_demo(fw::Router& router, Services& services);
void register_ai_mistral_demo(fw::Router& router, Services& services);
void register_ai_cohere_demo(fw::Router& router, Services& services);
void register_ai_perplexity_demo(fw::Router& router, Services& services);
void register_ai_bedrock_demo(fw::Router& router, Services& services);
void register_ai_azure_demo(fw::Router& router, Services& services);
void register_ai_huggingface_demo(fw::Router& router, Services& services);
void register_ai_audio_demo(fw::Router& router, Services& services);
void register_ai_media_demo(fw::Router& router, Services& services);
void register_ai_retrieval_demo(fw::Router& router, Services& services);
// Mounts every vendor router at "" (called once from build_application).
void register_ai_demos(std::shared_ptr<fw::Application> app, Services& services);
} // namespace molo::example::app