pub struct ManagerInstruction {
pub instruction: Option<String>,
pub suggested_action: Option<String>,
pub suggested_target: Option<String>,
pub exploration_hint: Option<String>,
}Expand description
Manager から Worker への指示(Prompt 埋め込み用の軽量版)
前回の Manager 判断を次回の Worker Prompt に埋め込むために使用。 Guidance から必要な情報のみを抽出した構造体。
§使用フロー
Tick N: Manager.finalize() → Guidance → ManagerInstruction::from(&guidance)
Tick N+1: Manager.prepare() → ResolvedContext.manager_instruction = Some(...)
→ PromptBuilder が "Manager's Instruction" セクションを生成Fields§
§instruction: Option<String>Manager からの指示テキスト(Guidance.content)
suggested_action: Option<String>推奨されたアクション名(Guidance.actions[0].name)
suggested_target: Option<String>推奨されたアクションの対象(Guidance.actions[0].params.target)
exploration_hint: Option<String>探索ヒント(ExplorationTarget からの情報)
Implementations§
Source§impl ManagerInstruction
impl ManagerInstruction
Sourcepub fn with_instruction(self, instruction: impl Into<String>) -> Self
pub fn with_instruction(self, instruction: impl Into<String>) -> Self
指示テキストを設定
Sourcepub fn with_suggested_action(self, action: impl Into<String>) -> Self
pub fn with_suggested_action(self, action: impl Into<String>) -> Self
推奨アクションを設定
Sourcepub fn with_suggested_target(self, target: impl Into<String>) -> Self
pub fn with_suggested_target(self, target: impl Into<String>) -> Self
推奨ターゲットを設定
Sourcepub fn with_exploration_hint(self, hint: impl Into<String>) -> Self
pub fn with_exploration_hint(self, hint: impl Into<String>) -> Self
探索ヒントを設定
Sourcepub fn from_guidance(guidance: &Guidance) -> Self
pub fn from_guidance(guidance: &Guidance) -> Self
Guidance から ManagerInstruction を生成
Sourcepub fn has_content(&self) -> bool
pub fn has_content(&self) -> bool
情報があるかどうか
Trait Implementations§
Source§impl Clone for ManagerInstruction
impl Clone for ManagerInstruction
Source§fn clone(&self) -> ManagerInstruction
fn clone(&self) -> ManagerInstruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ManagerInstruction
impl Debug for ManagerInstruction
Source§impl Default for ManagerInstruction
impl Default for ManagerInstruction
Source§fn default() -> ManagerInstruction
fn default() -> ManagerInstruction
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ManagerInstruction
impl RefUnwindSafe for ManagerInstruction
impl Send for ManagerInstruction
impl Sync for ManagerInstruction
impl Unpin for ManagerInstruction
impl UnwindSafe for ManagerInstruction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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