From bddd008d8354847193b91d82b7424bb10b496439 Mon Sep 17 00:00:00 2001 From: Daiyi Peng Date: Wed, 23 Oct 2024 09:03:42 -0700 Subject: [PATCH] Fix vertexai_test break. PiperOrigin-RevId: 688986487 --- langfun/core/llms/vertexai_test.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/langfun/core/llms/vertexai_test.py b/langfun/core/llms/vertexai_test.py index 57b9358..9295868 100644 --- a/langfun/core/llms/vertexai_test.py +++ b/langfun/core/llms/vertexai_test.py @@ -195,8 +195,12 @@ def test_generation_config(self): stop=['\n'], ), ) + actual = config.to_dict() + # There is a discrepancy between the `property_ordering` in the + # Google-internal version and the open-source version. + actual['response_schema'].pop('property_ordering', None) self.assertEqual( - config.to_dict(), + actual, dict( temperature=2.0, top_p=1.0, @@ -209,7 +213,6 @@ def test_generation_config(self): 'properties': { 'name': {'type_': 'STRING'} }, - 'property_ordering': ['name'], 'required': ['name'], 'title': 'Person', }