google / langfun

OO for LLMs
Apache License 2.0
100 stars 17 forks source link

Add stability check for boolean fields in prompts #240

Closed Ruijian-Zha closed 1 week ago

Ruijian-Zha commented 3 weeks ago

Added a check in the transform_input method to detect boolean fields in the schema. Appended a directive to the prompt to ensure boolean fields explicitly return either True or False, never None. This enhancement prevents the output from containing local variables, ensuring more stable and reliable results.

google-cla[bot] commented 3 weeks ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.