MCPcopy Create free account
hub / github.com/AI45Lab/Code / from

Method from

sdk/python/src/lib.rs:199–216  ·  view source on GitHub ↗
(r: RustAgentResult)

Source from the content-addressed store, hash-verified

197
198impl From<RustAgentResult> for PyAgentResult {
199 fn from(r: RustAgentResult) -> Self {
200 let verification_summary = r.verification_summary();
201 let verification_summary_json = verification_summary.to_value().to_string();
202 let verification_summary_text = rust_format_verification_summary(&verification_summary);
203 Self {
204 text: r.text,
205 tool_calls_count: r.tool_calls_count,
206 prompt_tokens: r.usage.prompt_tokens,
207 completion_tokens: r.usage.completion_tokens,
208 total_tokens: r.usage.total_tokens,
209 verification_status: verification_status_label(verification_summary.status),
210 pending_verification_count: verification_summary.pending_required_check_count,
211 failed_verification_count: verification_summary.failed_check_count,
212 verification_report_count: verification_summary.report_count,
213 verification_summary_json,
214 verification_summary_text,
215 }
216 }
217}
218
219fn verification_status_label(status: RustVerificationStatus) -> String {

Callers

nothing calls this directly

Calls 3

verification_summaryMethod · 0.45
to_valueMethod · 0.45

Tested by

no test coverage detected