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

Function test_anthropic_build_request_tools

core/src/llm/tests.rs:689–698  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

687
688 #[test]
689 fn test_anthropic_build_request_tools() {
690 let c = AnthropicClient::new("k".into(), "claude-3".into());
691 let tools = vec![ToolDefinition {
692 name: "bash".into(),
693 description: "Run".into(),
694 parameters: serde_json::json!({"type":"object"}),
695 }];
696 let b = c.build_request(&[Message::user("Hi")], None, &tools);
697 assert_eq!(b["tools"].as_array().unwrap().len(), 1);
698 }
699
700 #[test]
701 fn test_openai_convert_user_msg() {

Callers

nothing calls this directly

Calls 1

build_requestMethod · 0.80

Tested by

no test coverage detected