pub struct ContainerFiles<'c, C: Config> { /* private fields */ }Available on crate feature
container only.Expand description
Create and manage container files for use with the Code Interpreter tool.
Implementations§
Source§impl<'c, C: Config> ContainerFiles<'c, C>
impl<'c, C: Config> ContainerFiles<'c, C>
pub fn new(client: &'c Client<C>, container_id: &str) -> Self
Sourcepub async fn create(
&self,
request: CreateContainerFileRequest,
) -> Result<ContainerFileResource, OpenAIError>
pub async fn create( &self, request: CreateContainerFileRequest, ) -> Result<ContainerFileResource, OpenAIError>
Create a container file by uploading a raw file or by referencing an existing file ID. Create a container file by uploading a raw file or by referencing an existing file ID.
Sourcepub async fn create_byot<T0: Clone, R: DeserializeOwned>(
&self,
request: T0,
) -> Result<R, OpenAIError>
pub async fn create_byot<T0: Clone, R: DeserializeOwned>( &self, request: T0, ) -> Result<R, OpenAIError>
Create a container file by uploading a raw file or by referencing an existing file ID.
Sourcepub async fn list(&self) -> Result<ContainerFileListResource, OpenAIError>
pub async fn list(&self) -> Result<ContainerFileListResource, OpenAIError>
List container files. List container files.
Sourcepub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
pub async fn list_byot<R: DeserializeOwned>(&self) -> Result<R, OpenAIError>
List container files.
Sourcepub async fn retrieve(
&self,
file_id: &str,
) -> Result<ContainerFileResource, OpenAIError>
pub async fn retrieve( &self, file_id: &str, ) -> Result<ContainerFileResource, OpenAIError>
Retrieve a container file. Retrieve a container file.
Sourcepub async fn retrieve_byot<T0: Display, R: DeserializeOwned>(
&self,
file_id: T0,
) -> Result<R, OpenAIError>
pub async fn retrieve_byot<T0: Display, R: DeserializeOwned>( &self, file_id: T0, ) -> Result<R, OpenAIError>
Retrieve a container file.
Sourcepub async fn delete(
&self,
file_id: &str,
) -> Result<DeleteContainerFileResponse, OpenAIError>
pub async fn delete( &self, file_id: &str, ) -> Result<DeleteContainerFileResponse, OpenAIError>
Delete a container file. Delete a container file.
Sourcepub async fn delete_byot<T0: Display, R: DeserializeOwned>(
&self,
file_id: T0,
) -> Result<R, OpenAIError>
pub async fn delete_byot<T0: Display, R: DeserializeOwned>( &self, file_id: T0, ) -> Result<R, OpenAIError>
Delete a container file.
Trait Implementations§
Source§impl<'c, C: Config> RequestOptionsBuilder for ContainerFiles<'c, C>
Available on crate feature _api only.
impl<'c, C: Config> RequestOptionsBuilder for ContainerFiles<'c, C>
Available on crate feature
_api only.Source§fn options_mut(&mut self) -> &mut RequestOptions
fn options_mut(&mut self) -> &mut RequestOptions
Get mutable reference to RequestOptions (for building)
Source§fn options(&self) -> &RequestOptions
fn options(&self) -> &RequestOptions
Get reference to RequestOptions
Source§fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
fn header<K, V>(self, key: K, value: V) -> Result<Self, OpenAIError>
Add a single header to RequestOptions
Auto Trait Implementations§
impl<'c, C> Freeze for ContainerFiles<'c, C>
impl<'c, C> !RefUnwindSafe for ContainerFiles<'c, C>
impl<'c, C> Send for ContainerFiles<'c, C>
impl<'c, C> Sync for ContainerFiles<'c, C>
impl<'c, C> Unpin for ContainerFiles<'c, C>
impl<'c, C> !UnwindSafe for ContainerFiles<'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