Skip to main content

ScenePrompt

Trait ScenePrompt 

Source
pub trait ScenePrompt: Send + Sync {
    // Required method
    fn system(&self, ctx: &ScenePromptContext<'_>) -> Vec<PromptBlock>;

    // Provided method
    fn session_context(&self, _ctx: &ScenePromptContext<'_>) -> String { ... }
}
Expand description

The scene’s system prompt and the facts it sends once in the opening context message.

Required Methods§

Provided Methods§

Source

fn session_context(&self, _ctx: &ScenePromptContext<'_>) -> String

Facts about this session — working directory, platform, scratchpad — sent once in the opening context message instead of the system prompt.

Some endpoints (DeepSeek) cache the request prefix in the order system, tools, messages: anything per-session in the system prompt makes every new session re-read the whole tool table uncached.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§