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.
- langfun/core/structured/schema.py +5 -0
- langfun/core/structured/schema_test.py +13 -0
- {langfun-0.1.2.dev202504270803.dist-info → langfun-0.1.2.dev202504280818.dist-info}/METADATA +1 -1
- {langfun-0.1.2.dev202504270803.dist-info → langfun-0.1.2.dev202504280818.dist-info}/RECORD +7 -7
- {langfun-0.1.2.dev202504270803.dist-info → langfun-0.1.2.dev202504280818.dist-info}/WHEEL +1 -1
- {langfun-0.1.2.dev202504270803.dist-info → langfun-0.1.2.dev202504280818.dist-info}/licenses/LICENSE +0 -0
- {langfun-0.1.2.dev202504270803.dist-info → langfun-0.1.2.dev202504280818.dist-info}/top_level.txt +0 -0
@@ -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
|
@@ -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=
|
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=
|
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.
|
160
|
-
langfun-0.1.2.
|
161
|
-
langfun-0.1.2.
|
162
|
-
langfun-0.1.2.
|
163
|
-
langfun-0.1.2.
|
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,,
|
{langfun-0.1.2.dev202504270803.dist-info → langfun-0.1.2.dev202504280818.dist-info}/licenses/LICENSE
RENAMED
File without changes
|
{langfun-0.1.2.dev202504270803.dist-info → langfun-0.1.2.dev202504280818.dist-info}/top_level.txt
RENAMED
File without changes
|