pub struct GraphState {
pub conversation_id: String,
pub run_id: String,
pub messages: Vec<Message>,
pub llm_config: LLMConfig,
pub variables: HashMap<String, Value>,
}Fields§
§conversation_id: String§run_id: String§messages: Vec<Message>§llm_config: LLMConfig§variables: HashMap<String, Value>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 moreSource§impl Debug for GraphState
impl Debug for GraphState
Source§impl<'de> Deserialize<'de> for GraphState
impl<'de> Deserialize<'de> for GraphState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto 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