Skip to content

Commit

Permalink
Merge pull request #29 from JC1DA/overhaul_loc
Browse files Browse the repository at this point in the history
Merge main repo
  • Loading branch information
JC1DA authored Dec 15, 2024
2 parents 69f723c + c6b4b3c commit 3bf09b5
Show file tree
Hide file tree
Showing 11 changed files with 246 additions and 2,028 deletions.
284 changes: 152 additions & 132 deletions guidance/_grammar.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions guidance/library/_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def gen(
lm,
name=None,
*,
max_tokens=1e10,
max_tokens=None,
list_append=False,
regex=None,
tools=None,
Expand Down Expand Up @@ -174,7 +174,7 @@ def gen(
break
return lm

pattern = Gen(body_regex=regex, stop_regex=gen_stop, save_stop_text=save_stop_text, name=tagged_name, max_tokens=max_tokens)
pattern = Gen(body_regex=regex, stop_regex=gen_stop, save_stop_text=save_stop_text, capture_name=tagged_name, max_tokens=max_tokens)

# define any capture group for non-tool calls
if name is not None and tools is None:
Expand Down
Loading

0 comments on commit 3bf09b5

Please sign in to comment.