pub struct OpenAiGatewayFabric { /* private fields */ }Expand description
Location-transparent eval fabric exposing the OpenAI gateway as an EvalFabric.
Decodes an EvalRequest into a /v1/responses gateway request, runs it
against the shared route state (store, cache, runners, federation), and
returns the gateway response wrapped as a runtime value. Server code targets
this surface rather than a transport-specific API.
Implementations§
Source§impl OpenAiGatewayFabric
impl OpenAiGatewayFabric
Sourcepub fn deterministic(
id_start: u64,
clock_start_ms: u64,
clock_step_ms: u64,
) -> Self
pub fn deterministic( id_start: u64, clock_start_ms: u64, clock_step_ms: u64, ) -> Self
Returns a fabric with deterministic ids and a fixed-step simulated clock.
Suitable for tests and replay: ids count from id_start and the clock
starts at clock_start_ms, advancing clock_step_ms per read.
Sourcepub fn with_state_system(state: GatewayRouteState, id_seed: u64) -> Self
pub fn with_state_system(state: GatewayRouteState, id_seed: u64) -> Self
Returns a fabric over the supplied state using the system clock.
Response ids are seeded deterministically from id_seed.
Sourcepub fn eval_request_for_gateway_request(request: &GatewayRequest) -> EvalRequest
pub fn eval_request_for_gateway_request(request: &GatewayRequest) -> EvalRequest
Returns the local-first eval request that carries request’s body for realization.
Sourcepub fn last_execution(&self) -> Result<Option<ResponseExecution>>
pub fn last_execution(&self) -> Result<Option<ResponseExecution>>
Returns the most recent response execution, or None before any run.
Trait Implementations§
Source§impl EvalFabric for OpenAiGatewayFabric
impl EvalFabric for OpenAiGatewayFabric
Source§impl Object for OpenAiGatewayFabric
impl Object for OpenAiGatewayFabric
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.