diff --git a/libs/community/langchain_community/chat_models/oci_generative_ai.py b/libs/community/langchain_community/chat_models/oci_generative_ai.py index f66449bc564b3..0c64592fb945f 100644 --- a/libs/community/langchain_community/chat_models/oci_generative_ai.py +++ b/libs/community/langchain_community/chat_models/oci_generative_ai.py @@ -61,6 +61,7 @@ "integer": "int", "array": "List", "object": "Dict", + "any": "any", } @@ -323,7 +324,7 @@ def convert_to_oci_tool( if "description" in p_def else "", type=JSON_TO_PYTHON_TYPES.get( - p_def.get("type"), p_def.get("type") + p_def.get("type"), p_def.get("type", "any") ), is_required="default" not in p_def, ) @@ -342,7 +343,7 @@ def convert_to_oci_tool( p_name: self.oci_tool_param( description=p_def.get("description"), type=JSON_TO_PYTHON_TYPES.get( - p_def.get("type"), p_def.get("type") + p_def.get("type"), p_def.get("type", "any") ), is_required="default" not in p_def, ) @@ -363,7 +364,7 @@ def convert_to_oci_tool( p_name: self.oci_tool_param( description=p_def.get("description"), type=JSON_TO_PYTHON_TYPES.get( - p_def.get("type"), p_def.get("type") + p_def.get("type"), p_def.get("type", "any") ), is_required=p_name in parameters.get("required", []), )