From 965ad819f97c1c96918c9e699b13587b4ce726ae Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Fri, 31 Jan 2025 12:18:33 -0800 Subject: [PATCH] Fix for tests with pydantic<2, refs #728 --- llm/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llm/cli.py b/llm/cli.py index bd607796..949b5896 100644 --- a/llm/cli.py +++ b/llm/cli.py @@ -1136,7 +1136,7 @@ def models_list(options, async_, query): for name, field in model.Options.schema()["properties"].items(): any_of = field.get("anyOf") if any_of is None: - any_of = [{"type": field["type"]}] + any_of = [{"type": field.get("type", "str")}] types = ", ".join( [ _type_lookup.get(item.get("type"), item.get("type", "str"))