pub struct Guidance {
pub actions: Vec<Action>,
pub content: Option<String>,
pub props: HashMap<String, Vec<u8>>,
pub exploration_target: Option<ExplorationTarget>,
pub scope: WorkerScope,
}Expand description
Fields§
§actions: Vec<Action>実行すべき/候補となる Action のリスト
content: Option<String>方針・ヒント・追加コンテキスト(オプション)
props: HashMap<String, Vec<u8>>拡張用プロパティ(将来の追加データ用)
exploration_target: Option<ExplorationTarget>探索ターゲット(Manager からの探索指示)
scope: WorkerScopeWorker が見る情報のスコープ
Implementations§
Source§impl Guidance
impl Guidance
Sourcepub fn with_candidates(actions: Vec<Action>, content: impl Into<String>) -> Self
pub fn with_candidates(actions: Vec<Action>, content: impl Into<String>) -> Self
複数 Action 候補 + 方針テキストを作成(LLMBased 向け)
Sourcepub fn with_scope(self, scope: WorkerScope) -> Self
pub fn with_scope(self, scope: WorkerScope) -> Self
スコープを設定
Sourcepub fn with_exploration_target(self, target: ExplorationTarget) -> Self
pub fn with_exploration_target(self, target: ExplorationTarget) -> Self
探索ターゲットを設定
Trait Implementations§
Source§impl<S: MapState> From<&MapNode<ActionNodeData, S>> for Guidance
impl<S: MapState> From<&MapNode<ActionNodeData, S>> for Guidance
Source§fn from(node: &MapNode<ActionNodeData, S>) -> Self
fn from(node: &MapNode<ActionNodeData, S>) -> Self
MapNode から Guidance への変換
V2 ExplorationSpace の select_nodes() 結果を直接 Guidance に変換する。 Manager はこれをそのまま Worker に渡せる。
§変換内容
node.data→Action(ActionNodeData から変換)node.data.discovery→hint(ExplorationTarget に設定)node.id→exploration_target.node_id
Auto Trait Implementations§
impl Freeze for Guidance
impl RefUnwindSafe for Guidance
impl Send for Guidance
impl Sync for Guidance
impl Unpin for Guidance
impl UnwindSafe for Guidance
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