pub struct GenAiTransport { /* private fields */ }Expand description
perspt_sdk::ModelTransport implemented over the core portfolio.
Implementations§
Source§impl GenAiTransport
impl GenAiTransport
Sourcepub fn new(portfolio: Arc<ModelPortfolio>) -> Self
pub fn new(portfolio: Arc<ModelPortfolio>) -> Self
Wrap a live portfolio.
Sourcepub fn portfolio(&self) -> &ModelPortfolio
pub fn portfolio(&self) -> &ModelPortfolio
The wrapped portfolio, for surfaces such as perspt providers.
Trait Implementations§
Source§impl ModelTransport for GenAiTransport
impl ModelTransport for GenAiTransport
Source§fn adapter_kind(&self) -> &'static str
fn adapter_kind(&self) -> &'static str
The genai driver’s adapter identity (PSP-10 system 24). One identity
for the whole driver: endpoint/provider ids stay credentials, and a
gateway-served model keeps its own family via family_of.
Source§fn chat_turn<'a>(
&'a self,
model: &'a ModelId,
conversation: &'a Conversation,
tools: &'a [ToolSpec],
choice: ToolChoicePolicy,
) -> TransportFuture<'a, TurnOutput>
fn chat_turn<'a>( &'a self, model: &'a ModelId, conversation: &'a Conversation, tools: &'a [ToolSpec], choice: ToolChoicePolicy, ) -> TransportFuture<'a, TurnOutput>
Run one chat turn: render the conversation for the route’s provider,
send the tool specs, and return either tool calls or text. Read more
Source§fn chat_turn_with_options<'a>(
&'a self,
model: &'a ModelId,
conversation: &'a Conversation,
tools: &'a [ToolSpec],
choice: ToolChoicePolicy,
options: GenerationOptions,
) -> TransportFuture<'a, TurnOutput>
fn chat_turn_with_options<'a>( &'a self, model: &'a ModelId, conversation: &'a Conversation, tools: &'a [ToolSpec], choice: ToolChoicePolicy, options: GenerationOptions, ) -> TransportFuture<'a, TurnOutput>
Run one turn with explicit generation controls. Implementations that
cannot express them retain their ordinary turn behavior.
Source§fn capabilities(&self, model: &ModelId) -> ProviderCapabilities
fn capabilities(&self, model: &ModelId) -> ProviderCapabilities
The route’s capability record (declared or probed).
Source§fn family_of(&self, model: &ModelId) -> ModelFamily
fn family_of(&self, model: &ModelId) -> ModelFamily
The model’s training lineage — a routing prior, never a measurement.
Source§fn prompt_route(&self, model: &ModelId) -> PromptRoute
fn prompt_route(&self, model: &ModelId) -> PromptRoute
The prompt identity of one call: adapter kind, model family, and the
exact model. A model served through a compatible gateway keeps its
own family identity.
Auto Trait Implementations§
impl Freeze for GenAiTransport
impl !RefUnwindSafe for GenAiTransport
impl Send for GenAiTransport
impl Sync for GenAiTransport
impl Unpin for GenAiTransport
impl UnsafeUnpin for GenAiTransport
impl !UnwindSafe for GenAiTransport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.