pub struct InteractResponse {Show 16 fields
pub success: bool,
pub cdp_url: Option<String>,
pub live_view_url: Option<String>,
pub interactive_live_view_url: Option<String>,
pub output: Option<String>,
pub stdout: String,
pub stderr: String,
pub result: Option<String>,
pub exit_code: i32,
pub killed: bool,
pub error: Option<String>,
pub data: Option<Document>,
pub actions: Option<Value>,
pub steps: Vec<Value>,
pub llm_usage: Option<Value>,
pub warnings: Vec<String>,
}Expand description
success: false 是这次动作没有做完(选择器找不到、超时),会话还在,可以继续调用;
会话本身不可用(已关闭、已回收、id 不对)走 HTTP 错误。
Fields§
§success: bool§cdp_url: Option<String>永远是 null:不开放浏览器的调试端口。
live_view_url: Option<String>永远是 null:没有实时画面。
interactive_live_view_url: Option<String>永远是 null:没有实时画面。
output: Option<String>模型对 prompt 的回答。
stdout: String没有代码执行,永远为空。
stderr: String没有代码执行,永远为空。
result: Option<String>prompt:模型最后看到的页面快照;actions:最后一个 executeJavascript 的返回值。
exit_code: i32§killed: bool到时限被中止。
error: Option<String>§data: Option<Document>PageSift extension:动作之后的页面,格式取自原来的抓取。
actions: Option<Value>PageSift extension:actions 的产出(截图、scrape、executeJavascript、PDF)。
steps: Vec<Value>PageSift extension:prompt 实际执行的步骤(动作、元素的角色和名称;不含输入的文字)。
llm_usage: Option<Value>PageSift extension:prompt 调了几次模型、多少 token({calls, tokens})。
warnings: Vec<String>Implementations§
Trait Implementations§
Source§impl Clone for InteractResponse
impl Clone for InteractResponse
Source§impl Debug for InteractResponse
impl Debug for InteractResponse
Source§impl Default for InteractResponse
impl Default for InteractResponse
Source§impl<'de> Deserialize<'de> for InteractResponse
impl<'de> Deserialize<'de> for InteractResponse
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
Source§impl PartialEq for InteractResponse
impl PartialEq for InteractResponse
Source§impl Serialize for InteractResponse
impl Serialize for InteractResponse
impl StructuralPartialEq for InteractResponse
Auto Trait Implementations§
impl Forget for InteractResponse
impl Freeze for InteractResponse
impl Move for InteractResponse
impl RefUnwindSafe for InteractResponse
impl Send for InteractResponse
impl Sync for InteractResponse
impl Unpin for InteractResponse
impl UnsafeUnpin for InteractResponse
impl UnwindSafe for InteractResponse
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