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

Method complete

core/src/tools/task.rs:1635–1654  ·  view source on GitHub ↗
(
            &self,
            messages: &[Message],
            system: Option<&str>,
            tools: &[ToolDefinition],
        )

Source from the content-addressed store, hash-verified

1633 #[async_trait::async_trait]
1634 impl LlmClient for SchemaCoercionClient {
1635 async fn complete(
1636 &self,
1637 messages: &[Message],
1638 system: Option<&str>,
1639 tools: &[ToolDefinition],
1640 ) -> Result<LlmResponse> {
1641 if system == Some(crate::prompts::PRE_ANALYSIS_SYSTEM) {
1642 return Ok(pre_analysis_response(messages));
1643 }
1644 // The structured-output coercion injects a synthetic tool named
1645 // `emit_<schema_name>` (here `emit_step_output`).
1646 if tools.iter().any(|t| t.name == "emit_step_output") {
1647 return Ok(MockLlmClient::tool_call_response(
1648 "coerce-1",
1649 "emit_step_output",
1650 serde_json::json!({ "verdict": "ok" }),
1651 ));
1652 }
1653 Ok(text_response("The verdict is ok."))
1654 }
1655
1656 async fn complete_streaming(
1657 &self,

Callers

nothing calls this directly

Calls 6

pre_analysis_responseFunction · 0.85
text_responseFunction · 0.85
last_textFunction · 0.85
record_activeMethod · 0.80
containsMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected