pub struct DependencyPromptGenerator;Expand description
LLM 向けプロンプト生成
分割クエリ方式:first/lastを個別に聞いて安定した結果を得る。 ActionDef の name と description を使ってヒントを生成。
Implementations§
Source§impl DependencyPromptGenerator
impl DependencyPromptGenerator
Sourcepub fn generate_prompt(task: &str, actions: &[ActionDef]) -> String
pub fn generate_prompt(task: &str, actions: &[ActionDef]) -> String
依存グラフ生成用のプロンプトを生成
従来の全順序プロンプト(フォールバック用)
Sourcepub fn generate_first_prompt(_task: &str, actions: &[ActionDef]) -> String
pub fn generate_first_prompt(_task: &str, actions: &[ActionDef]) -> String
First step を聞くプロンプト
ActionDef の description から動詞を抽出してヒントを生成。 例: “Search for patterns” → “Which step SEARCHES?”
Sourcepub fn generate_last_prompt(_task: &str, actions: &[ActionDef]) -> String
pub fn generate_last_prompt(_task: &str, actions: &[ActionDef]) -> String
Last step を聞くプロンプト
ActionDef の name と description をそのまま渡す。 description に “requires X first” 等の情報があれば LLM が判断できる。
Auto Trait Implementations§
impl Freeze for DependencyPromptGenerator
impl RefUnwindSafe for DependencyPromptGenerator
impl Send for DependencyPromptGenerator
impl Sync for DependencyPromptGenerator
impl Unpin for DependencyPromptGenerator
impl UnwindSafe for DependencyPromptGenerator
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> 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