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

Function gen_message

core/tests/test_persisted_schema_roundtrip.rs:255–263  ·  view source on GitHub ↗
(rng: &mut Rng)

Source from the content-addressed store, hash-verified

253}
254
255fn gen_message(rng: &mut Rng) -> Message {
256 let roles = ["user", "assistant", "system", "tool"];
257 let n = rng.below(4);
258 Message {
259 role: roles[rng.usize_below(roles.len() as u64)].to_string(),
260 content: (0..n).map(|_| gen_content_block(rng)).collect(),
261 reasoning_content: rng.opt_string(),
262 }
263}
264
265fn gen_verification_status(rng: &mut Rng) -> VerificationStatus {
266 match rng.below(4) {

Callers 3

gen_loop_checkpointFunction · 0.85
gen_session_dataFunction · 0.85

Calls 5

gen_content_blockFunction · 0.85
belowMethod · 0.80
usize_belowMethod · 0.80
opt_stringMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected