pub struct ChatModelRunOptions {
pub messages: Arc<[Arc<ThreadMessage>]>,
pub run_config: RunConfig,
pub abort_signal: AbortSignal,
pub context: ModelContext,
pub assistant_message_id: MessageId,
pub thread_id: Option<String>,
pub parent_id: Option<MessageId>,
pub message: AssistantMessage,
}Expand description
Everything an adapter receives for one step (ChatModelRunOptions).
Fields§
§messages: Arc<[Arc<ThreadMessage>]>The selected path up to and including the message being answered.
run_config: RunConfigThe run’s configuration.
abort_signal: AbortSignalFires when the run is cancelled; stop work and end the stream.
context: ModelContextThe app’s system prompt, tools and settings.
assistant_message_id: MessageIdId of the assistant message this step fills.
thread_id: Option<String>The thread’s remote id, when it has one.
parent_id: Option<MessageId>The message being answered.
message: AssistantMessageThe assistant message being answered, as it was when this step started
(unstable_getMessage() upstream). Its content is non-empty when a run
continues after tool results; its metadata holds the thread state.
Trait Implementations§
Source§impl Clone for ChatModelRunOptions
impl Clone for ChatModelRunOptions
Auto Trait Implementations§
impl Forget for ChatModelRunOptions
impl Freeze for ChatModelRunOptions
impl Move for ChatModelRunOptions
impl RefUnwindSafe for ChatModelRunOptions
impl Send for ChatModelRunOptions
impl Sync for ChatModelRunOptions
impl Unpin for ChatModelRunOptions
impl UnsafeUnpin for ChatModelRunOptions
impl UnwindSafe for ChatModelRunOptions
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