prompty_foundry/lib.rs
1//! Azure OpenAI / Foundry provider for Prompty.
2//!
3//! This crate provides Azure OpenAI and Foundry executor and processor
4//! implementations. It reuses the OpenAI wire format from `prompty-openai`
5//! and adds Azure-specific URL construction and authentication.
6//!
7//! Registered under keys `"foundry"` and `"azure"` (legacy alias).
8//!
9//! # Usage
10//!
11//! ```rust,no_run
12//! prompty_foundry::register();
13//! // Now invoke/turn will use Azure OpenAI for agents with provider="foundry" or "azure"
14//! ```
15
16pub mod executor;
17pub mod models;
18pub mod processor;
19
20pub use executor::FoundryExecutor;
21pub use models::{list_models, list_models_async};
22pub use processor::FoundryProcessor;
23
24/// Register the Foundry executor and processor in the global registry.
25///
26/// Registers under both `"foundry"` (preferred) and `"azure"` (legacy alias).
27pub fn register() {
28 prompty::register_executor("foundry", FoundryExecutor);
29 prompty::register_processor("foundry", FoundryProcessor);
30 prompty::register_executor("azure", FoundryExecutor);
31 prompty::register_processor("azure", FoundryProcessor);
32}