Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds verify to mall #26

Merged
merged 17 commits into from
Oct 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes example issue in verify, updates frozen code
edgararuiz committed Oct 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit dfd52fb7cd853cdb16b0de3d4ad43bd43d803177
4 changes: 2 additions & 2 deletions _freeze/reference/MallFrame/execute-results/html.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions python/mall/llm.py
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ def llm_call(x, msg, use, preview=False, valid_resps="", convert=None):
if isinstance(valid_resps, list):
if out not in valid_resps:
out = None

return out


4 changes: 2 additions & 2 deletions reference/MallFrame.qmd
Original file line number Diff line number Diff line change
@@ -292,10 +292,10 @@ Check to see if something is true about the text.
#### Examples

```{python}
reviews.llm.classify("review", "is the customer happy")
reviews.llm.verify("review", "is the customer happy")
```

```{python}
# Use 'yes_no' to modify the 'true' and 'false' values to return
reviews.llm.classify("review", "is the customer happy", ["y", "n"])
reviews.llm.verify("review", "is the customer happy", ["y", "n"])
```