Skip to content

Commit

Permalink
Fixing some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Sep 2, 2024
1 parent e8a98f4 commit 1fea23b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion blendsql/ingredients/builtin/map/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def make_predictions(lm, values, gen_f) -> guidance.models.Model:
if example_outputs:
prompt += f"\nHere are some example outputs: {example_outputs}\n"
prompt += "\nA:"
response = generate(model, prompt=prompt, max_tokens=max_tokens)
response = generate(model, prompt=prompt, max_tokens=max_tokens or 1000)
# Post-process language model response
_r = [
i.strip()
Expand Down
8 changes: 4 additions & 4 deletions blendsql/ingredients/builtin/qa/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ def __call__(
m
+ guidance.capture(
guidance.select(options=options_with_aliases),
name="result",
name="response",
)
)._variables["result"]
)._variables["response"]
else:
response = (
m
+ guidance.capture(
guidance.gen(max_tokens=max_tokens, stop="\n"), name="response"
guidance.gen(max_tokens=max_tokens or 50), name="response"
)
)._variables["result"]
)._variables["response"]
else:
prompt = m
if model.tokenizer is not None:
Expand Down

0 comments on commit 1fea23b

Please sign in to comment.