File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed
libs/standard-tests/langchain_tests/integration_tests Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -2582,15 +2582,25 @@ def supports_anthropic_inputs(self) -> bool:
2582
2582
if not self .supports_anthropic_inputs :
2583
2583
pytest .skip ("Model does not explicitly support Anthropic inputs." )
2584
2584
2585
- class color_picker (BaseModelV1 ):
2586
- """Input your fav color and get a random fact about it."""
2587
-
2588
- fav_color : str
2585
+ # Anthropic-format tool
2586
+ color_picker = {
2587
+ "name" : "color_picker" ,
2588
+ "input_schema" : {
2589
+ "type" : "object" ,
2590
+ "properties" : {
2591
+ "fav_color" : {"type" : "string" },
2592
+ },
2593
+ "required" : ["fav_color" ],
2594
+ },
2595
+ "description" : "Input your fav color and get a random fact about it." ,
2596
+ "cache_control" : {"type" : "ephemeral" },
2597
+ }
2589
2598
2590
2599
human_content : List [dict ] = [
2591
2600
{
2592
2601
"type" : "text" ,
2593
2602
"text" : "what's your favorite color in this image" ,
2603
+ "cache_control" : {"type" : "ephemeral" },
2594
2604
},
2595
2605
]
2596
2606
if self .supports_image_inputs :
You can’t perform that action at this time.
0 commit comments