MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / test_convert_tool

Function test_convert_tool

core/src/llm/azurellm.rs:738–759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

736
737 #[test]
738 fn test_convert_tool() {
739 let tool = LlmTool {
740 name: "get_weather".to_string(),
741 description: "Get the current weather".to_string(),
742 parameters: json!({
743 "type": "object",
744 "properties": {
745 "location": {
746 "type": "string",
747 "description": "The city name"
748 }
749 },
750 "required": ["location"]
751 }),
752 };
753
754 let azure_tool = AzureLlmProvider::convert_tool(&tool);
755 assert_eq!(azure_tool.r#type, "function");
756 assert_eq!(azure_tool.function.name, "get_weather");
757 assert_eq!(azure_tool.function.description, "Get the current weather");
758 assert_eq!(azure_tool.function.parameters["type"], "object");
759 }
760}

Callers

nothing calls this directly

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected