pub struct OpenAiGatewayFunction { /* private fields */ }Expand description
Callable runtime function exposing one gateway operation to the runtime.
Each instance wraps a single operation kind (serve, health, plan handling,
key management, admin reporting, …). It is registered under its
OpenAiGatewayFunction::symbol and dispatched through its Callable
implementation.
Implementations§
Source§impl OpenAiGatewayFunction
impl OpenAiGatewayFunction
Sourcepub fn serve() -> Self
pub fn serve() -> Self
Returns the openai-gateway/serve function, which builds the configured
gateway routes.
Sourcepub fn health() -> Self
pub fn health() -> Self
Returns the openai-gateway/health function, which produces a health
response.
Sourcepub fn models() -> Self
pub fn models() -> Self
Returns the openai-gateway/models function, which lists available
models.
Sourcepub fn plan_parse() -> Self
pub fn plan_parse() -> Self
Returns the openai-gateway/plan-parse function, which parses plan
source into an expression.
Sourcepub fn plan_check() -> Self
pub fn plan_check() -> Self
Returns the openai-gateway/plan-check function, which validates a plan
expression.
Sourcepub fn plan_run() -> Self
pub fn plan_run() -> Self
Returns the openai-gateway/plan-run function, which evaluates a plan
against a request.
Sourcepub fn plan_explain() -> Self
pub fn plan_explain() -> Self
Returns the openai-gateway/plan-explain function, which renders a
human-readable explanation of a plan.
Sourcepub fn plan_combinators() -> Self
pub fn plan_combinators() -> Self
Returns the openai-gateway/plan-combinators function, which lists the
available plan combinators.
Sourcepub fn fabric() -> Self
pub fn fabric() -> Self
Returns the openai-gateway/fabric function, which constructs an
in-memory eval fabric.
Sourcepub fn key_add() -> Self
pub fn key_add() -> Self
Returns the openai-gateway/key-add function, which registers an API
key with a capability set.
Sourcepub fn key_list() -> Self
pub fn key_list() -> Self
Returns the openai-gateway/key-list function, which lists registered
keys.
Sourcepub fn run_get() -> Self
pub fn run_get() -> Self
Returns the openai-gateway/run-get function, which fetches a single
run by id.
Sourcepub fn events() -> Self
pub fn events() -> Self
Returns the openai-gateway/events function, which reports stored
events.
Sourcepub fn storage_stats() -> Self
pub fn storage_stats() -> Self
Returns the openai-gateway/storage-stats function, which reports
storage statistics.
Sourcepub fn model_health() -> Self
pub fn model_health() -> Self
Returns the openai-gateway/model-health function, which reports model
health.
Sourcepub fn cache_stats() -> Self
pub fn cache_stats() -> Self
Returns the openai-gateway/cache-stats function, which reports plan
cache statistics.
Sourcepub fn capability_report() -> Self
pub fn capability_report() -> Self
Returns the openai-gateway/capability-report function, which reports
the gateway capability set.
Trait Implementations§
Source§impl Callable for OpenAiGatewayFunction
impl Callable for OpenAiGatewayFunction
Source§fn call(&self, cx: &mut Cx, args: Args) -> Result<Value>
fn call(&self, cx: &mut Cx, args: Args) -> Result<Value>
Args.Source§fn call_exprs(&self, cx: &mut Cx, args: RawArgs) -> Result<Value>
fn call_exprs(&self, cx: &mut Cx, args: RawArgs) -> Result<Value>
Source§impl Clone for OpenAiGatewayFunction
impl Clone for OpenAiGatewayFunction
Source§fn clone(&self) -> OpenAiGatewayFunction
fn clone(&self) -> OpenAiGatewayFunction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Object for OpenAiGatewayFunction
impl Object for OpenAiGatewayFunction
Source§fn display(&self, _cx: &mut Cx) -> Result<String>
fn display(&self, _cx: &mut Cx) -> Result<String>
Source§fn header(&self) -> &ObjectHeader
fn header(&self) -> &ObjectHeader
Source§fn op(&self, _key: &OpKey) -> Option<&dyn Op>
fn op(&self, _key: &OpKey) -> Option<&dyn Op>
key, if any.