pub struct AiService { /* private fields */ }Implementations§
Source§impl AiService
impl AiService
Sourcepub fn app(&self) -> &FirebaseApp
pub fn app(&self) -> &FirebaseApp
Returns the Firebase app associated with this AI service.
Sourcepub fn backend_type(&self) -> BackendType
pub fn backend_type(&self) -> BackendType
Returns the backend type tag.
Sourcepub fn options(&self) -> AiRuntimeOptions
pub fn options(&self) -> AiRuntimeOptions
Returns the runtime options currently applied to this AI service.
Sourcepub fn prepare_generate_content_request(
&self,
model: &str,
body: Value,
request_options: Option<RequestOptions>,
) -> AiResult<PreparedRequest>
pub fn prepare_generate_content_request( &self, model: &str, body: Value, request_options: Option<RequestOptions>, ) -> AiResult<PreparedRequest>
Prepares a REST request for a generateContent call without executing it.
This mirrors the behaviour of constructRequest in the TypeScript SDK and allows advanced
callers to integrate with custom HTTP stacks while the SDK handles URL/header generation.
pub fn generate_text( &self, request: GenerateTextRequest, ) -> AiResult<GenerateTextResponse>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AiService
impl RefUnwindSafe for AiService
impl Send for AiService
impl Sync for AiService
impl Unpin for AiService
impl UnwindSafe for AiService
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