pub(crate) struct ShippedDocument {
pub id: &'static str,
pub document: &'static str,
}
macro_rules! shipped_presets {
($(($id:literal, $file:literal)),+ $(,)?) => {
const DOCUMENTS: &[ShippedDocument] = &[
$(
ShippedDocument {
id: $id,
document: include_str!(concat!(
env!("CARGO_MANIFEST_DIR"),
"/presets/",
$file
)),
}
),+
];
pub const SHIPPED_PROFILE_IDS: &[&str] = &[$($id),+];
};
}
shipped_presets! {
("anthropic-oauth", "anthropic-oauth.toml"),
("anthropic", "anthropic.toml"),
("gemini", "gemini.toml"),
("grok-ollama", "grok-ollama.toml"),
("lmstudio", "lmstudio.toml"),
("openai-codex", "openai-codex.toml"),
("openai-codex-oauth", "openai-codex-oauth.toml"),
("openai", "openai.toml"),
("openrouter-codex", "openrouter-codex.toml"),
("openrouter", "openrouter.toml"),
("vllm", "vllm.toml"),
("xai-grok-build", "xai-grok-build.toml"),
("xai-grok-build-messages", "xai-grok-build-messages.toml"),
("xai-oauth", "xai-oauth.toml"),
("xai", "xai.toml"),
("amazon-bedrock", "amazon-bedrock.toml"),
("azure-openai", "azure-openai.toml"),
("cerebras", "cerebras.toml"),
("cohere", "cohere.toml"),
("dashscope", "dashscope.toml"),
("deepseek", "deepseek.toml"),
("fireworks", "fireworks.toml"),
("groq", "groq.toml"),
("hugging-face", "hugging-face.toml"),
("llama-cpp", "llama-cpp.toml"),
("minimax", "minimax.toml"),
("mistral", "mistral.toml"),
("moonshot", "moonshot.toml"),
("nvidia-nim", "nvidia-nim.toml"),
("ollama", "ollama.toml"),
("perplexity", "perplexity.toml"),
("qianfan", "qianfan.toml"),
("together", "together.toml"),
("vertex-anthropic", "vertex-anthropic.toml"),
("vertex-gemini", "vertex-gemini.toml"),
("volcengine-ark", "volcengine-ark.toml"),
("zhipu", "zhipu.toml"),
}
pub(crate) fn documents() -> &'static [ShippedDocument] {
DOCUMENTS
}
pub fn shipped_profile_ids() -> &'static [&'static str] {
SHIPPED_PROFILE_IDS
}