objectiveai_sdk/functions/executions/
http.rs1use crate::{HttpClient, HttpError};
4use futures::Stream;
5
6pub async fn create_function_execution_unary(
8 client: &HttpClient,
9 mut params: super::request::FunctionExecutionCreateParams,
10) -> Result<super::response::unary::FunctionExecution, HttpError> {
11 params.stream = None;
12 client
13 .send_unary(reqwest::Method::POST, "functions/executions", Some(params))
14 .await
15}
16
17pub async fn create_function_execution_streaming(
19 client: &HttpClient,
20 mut params: super::request::FunctionExecutionCreateParams,
21) -> Result<
22 impl Stream<
23 Item = Result<
24 super::response::streaming::FunctionExecutionChunk,
25 HttpError,
26 >,
27 >
28 + Send
29 + 'static
30 + use<>,
31 HttpError,
32> {
33 params.stream = Some(true);
34 client
35 .send_streaming(reqwest::Method::POST, "functions/executions", Some(params))
36 .await
37}