pub struct SubmitRunRequest {
pub target: Option<String>,
pub workflow_id: Option<String>,
pub input: Value,
pub max_retries: Option<u32>,
pub session_id: Option<String>,
pub user_id: Option<String>,
pub idempotency_key: Option<String>,
pub concurrency_key: Option<String>,
pub on_conflict: Option<OnConflict>,
pub not_before: Option<DateTime<Utc>>,
}Expand description
POST /runs request body.
§Example
use adk_server::background::SubmitRunRequest;
let request: SubmitRunRequest = serde_json::from_value(serde_json::json!({
"target": "support",
"input": { "text": "where is order 7?" },
"sessionId": "thread-42",
"concurrencyKey": "thread-42",
"onConflict": "interrupt",
"idempotencyKey": "webhook:evt_1"
})).unwrap();
assert_eq!(request.target.as_deref(), Some("support"));Fields§
§target: Option<String>The agent or workflow to run.
workflow_id: Option<String>The workflow to run; an alias of target kept for existing clients.
input: ValueThe run’s input: workflow state for a workflow, a string, {"text": ...}, or
{"content": ...} for an agent.
max_retries: Option<u32>Retries after the first attempt; maxAttempts is this plus one. Defaults to 0.
session_id: Option<String>The session an agent run continues; defaults to run-{runId}.
user_id: Option<String>The user the run belongs to in open mode; anonymous when absent. Ignored with an
authenticated caller, whose run is always their own.
idempotency_key: Option<String>Enqueueing an existing key returns the existing run. The key is scoped to the run’s
user — the authenticated caller, or in open mode the request’s userId — so only that
user’s runs match it.
concurrency_key: Option<String>Runs sharing a key run one at a time. With an authenticated caller the key is the caller’s own, so it never holds back or interrupts another user’s run.
on_conflict: Option<OnConflict>What happens when an unfinished run holds concurrencyKey (double texting).
not_before: Option<DateTime<Utc>>The run is not claimed before this time.
Trait Implementations§
Source§impl Debug for SubmitRunRequest
impl Debug for SubmitRunRequest
Source§impl<'de> Deserialize<'de> for SubmitRunRequest
impl<'de> Deserialize<'de> for SubmitRunRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Forget for SubmitRunRequest
impl Freeze for SubmitRunRequest
impl Move for SubmitRunRequest
impl RefUnwindSafe for SubmitRunRequest
impl Send for SubmitRunRequest
impl Sync for SubmitRunRequest
impl Unpin for SubmitRunRequest
impl UnsafeUnpin for SubmitRunRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
NonZeroI32Inner: UnsafeUnpin,
Utc: UnsafeUnpin,
impl UnwindSafe for SubmitRunRequestwhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
NonZero<i32>: UnwindSafe,
Utc: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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> ⓘ
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