diff --git a/blendsql/ingredients/builtin/map/main.py b/blendsql/ingredients/builtin/map/main.py index f389d71e..917bb899 100644 --- a/blendsql/ingredients/builtin/map/main.py +++ b/blendsql/ingredients/builtin/map/main.py @@ -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() diff --git a/blendsql/ingredients/builtin/qa/main.py b/blendsql/ingredients/builtin/qa/main.py index b63577ef..eacef0b7 100644 --- a/blendsql/ingredients/builtin/qa/main.py +++ b/blendsql/ingredients/builtin/qa/main.py @@ -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: