pub struct GraphState {
pub conversation_id: String,
pub run_id: String,
pub messages: Vec<Message>,
pub llm_config: LLMConfig,
pub variables: HashMap<String, Value>,
pub last_outputs: Option<Vec<GraphOutput>>,
}Fields§
§conversation_id: String§run_id: String§messages: Vec<Message>§llm_config: LLMConfig§variables: HashMap<String, Value>§last_outputs: Option<Vec<GraphOutput>>Implementations§
Source§impl GraphState
impl GraphState
pub fn new( conversation_id: String, run_id: String, messages: Vec<Message>, llm_config: LLMConfig, ) -> Self
pub fn from_input(input: GraphInput) -> Self
pub fn last_message(&self) -> Option<&Message>
pub fn add_message(&mut self, message: Message)
pub fn has_pending_tool_calls(&self) -> bool
pub fn get_pending_tool_calls(&self) -> Vec<ToolCall>
pub fn add_tool_result(&mut self, tool_call_id: String, result: String)
Trait Implementations§
Source§impl Clone for GraphState
impl Clone for GraphState
Source§fn clone(&self) -> GraphState
fn clone(&self) -> GraphState
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 moreAuto Trait Implementations§
impl Freeze for GraphState
impl RefUnwindSafe for GraphState
impl Send for GraphState
impl Sync for GraphState
impl Unpin for GraphState
impl UnwindSafe for GraphState
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