pub struct Responses<'c, C: Config> { /* private fields */ }
Expand description
Given text input or a list of context items, the model will generate a response.
Related guide: Responses API
Implementations§
Source§impl<'c, C: Config> Responses<'c, C>
impl<'c, C: Config> Responses<'c, C>
Sourcepub async fn create(
&self,
request: CreateResponse,
) -> Result<Response, OpenAIError>
pub async fn create( &self, request: CreateResponse, ) -> Result<Response, OpenAIError>
Creates a model response for the given input. Creates a model response for the given input.
Sourcepub async fn create_byot<T0: Serialize, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Serialize, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Creates a model response for the given input.
Auto Trait Implementations§
impl<'c, C> Freeze for Responses<'c, C>
impl<'c, C> !RefUnwindSafe for Responses<'c, C>
impl<'c, C> Send for Responses<'c, C>where
C: Sync,
impl<'c, C> Sync for Responses<'c, C>where
C: Sync,
impl<'c, C> Unpin for Responses<'c, C>
impl<'c, C> !UnwindSafe for Responses<'c, C>
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