langfun 0.1.2.dev202504270803__py3-none-any.whl → 0.1.2.dev202504280818__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of langfun might be problematic. Click here for more details.

@@ -456,6 +456,11 @@ def class_definition(
456
456
  )
457
457
  continue
458
458
 
459
+ # Skip fields that are marked as excluded from the prompt sent to LLM
460
+ # for OOP.
461
+ if field.metadata.get('exclude_from_prompt', False):
462
+ continue
463
+
459
464
  # Write field doc string as comments before the field definition.
460
465
  if field.description:
461
466
  for line in field.description.split('\n'):
@@ -538,6 +538,19 @@ class SchemaPythonReprTest(unittest.TestCase):
538
538
  """) + '\n'
539
539
  )
540
540
 
541
+ class E(pg.Object):
542
+ x: str
543
+ y: typing.Annotated[int, 'y', dict(exclude_from_prompt=True)]
544
+
545
+ self.assertEqual(
546
+ schema_lib.class_definition(E),
547
+ inspect.cleandoc(
548
+ """
549
+ class E(Object):
550
+ x: str
551
+ """) + '\n'
552
+ )
553
+
541
554
  def test_repr(self):
542
555
  class Foo(pg.Object):
543
556
  x: int
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langfun
3
- Version: 0.1.2.dev202504270803
3
+ Version: 0.1.2.dev202504280818
4
4
  Summary: Langfun: Language as Functions.
5
5
  Home-page: https://github.com/google/langfun
6
6
  Author: Langfun Authors
@@ -139,10 +139,10 @@ langfun/core/structured/parsing.py,sha256=MGvI7ypXlwfzr5XB8_TFU9Ei0_5reYqkWkv64e
139
139
  langfun/core/structured/parsing_test.py,sha256=kNPrhpdPY3iWhUld0TFYU-Zgn44wC0d6YuQ9XdVbQ8o,22346
140
140
  langfun/core/structured/querying.py,sha256=GGNtHtJcKh8rzLBNx_Df1ATvsPZzyfZuGkzSQVabdpo,24885
141
141
  langfun/core/structured/querying_test.py,sha256=vUuVUClYBFGEaO9KuD60huPE1dmP6RCRLeRnBv67NmQ,34263
142
- langfun/core/structured/schema.py,sha256=OGHmjyjraTnrq11Y5KrGyvKahviB1cfyvV9avd4UUZU,28126
142
+ langfun/core/structured/schema.py,sha256=pGiAjez-ON2nKLUSeAls27gJsMto5aJnCXLVwH3pUKM,28296
143
143
  langfun/core/structured/schema_generation.py,sha256=3AcuKvv3VOtKY5zMVqODrxfOuDxzoZtGeBxHlOWDOWw,5308
144
144
  langfun/core/structured/schema_generation_test.py,sha256=RM9s71kMNg2jTePwInkiW9fK1ACN37eyPeF8OII-0zw,2950
145
- langfun/core/structured/schema_test.py,sha256=L-HY9GWvfO4-kWuol6tY_zpLakNrwpMAxz2jUsY_e8s,25744
145
+ langfun/core/structured/schema_test.py,sha256=N8qNVA2hrHlxmHIoKtpzhBASa2RMVoPowF_noAfgPME,26035
146
146
  langfun/core/structured/scoring.py,sha256=Y7Jqs5VVjUQLF_9Z1uIY_dw5zasv2FF52Cz-cxGMsro,5857
147
147
  langfun/core/structured/scoring_test.py,sha256=QvlwDAzwuamKL5tCotm1L3Sx0cs3idoNK4aIEhaO4Yk,2272
148
148
  langfun/core/structured/tokenization.py,sha256=-b4_693quHeYn2AqndwucuXNmhd5NVXVTU3mmDane98,2189
@@ -156,8 +156,8 @@ langfun/core/templates/demonstration.py,sha256=vCrgYubdZM5Umqcgp8NUVGXgr4P_c-fik
156
156
  langfun/core/templates/demonstration_test.py,sha256=SafcDQ0WgI7pw05EmPI2S4v1t3ABKzup8jReCljHeK4,2162
157
157
  langfun/core/templates/selfplay.py,sha256=yhgrJbiYwq47TgzThmHrDQTF4nDrTI09CWGhuQPNv-s,2273
158
158
  langfun/core/templates/selfplay_test.py,sha256=Ot__1P1M8oJfoTp-M9-PQ6HUXqZKyMwvZ5f7yQ3yfyM,2326
159
- langfun-0.1.2.dev202504270803.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
160
- langfun-0.1.2.dev202504270803.dist-info/METADATA,sha256=-p76zsXSD3qQx9ZqulXFmhbENRRXiZr9hHLMgDuh4Us,7692
161
- langfun-0.1.2.dev202504270803.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
162
- langfun-0.1.2.dev202504270803.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
163
- langfun-0.1.2.dev202504270803.dist-info/RECORD,,
159
+ langfun-0.1.2.dev202504280818.dist-info/licenses/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
160
+ langfun-0.1.2.dev202504280818.dist-info/METADATA,sha256=plAMucug-VTFRA1dV85tEMMxAzexbS7Oro6dvINtLHA,7692
161
+ langfun-0.1.2.dev202504280818.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
162
+ langfun-0.1.2.dev202504280818.dist-info/top_level.txt,sha256=RhlEkHxs1qtzmmtWSwYoLVJAc1YrbPtxQ52uh8Z9VvY,8
163
+ langfun-0.1.2.dev202504280818.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5