Skip to content

Commit

Permalink
LogitsGenerator -> ModelObj
Browse files Browse the repository at this point in the history
  • Loading branch information
parkervg committed Jun 17, 2024
1 parent 152fb53 commit da799ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/reference/ingredients/creating-custom-ingredients.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class SummaryProgram(Program):
"""Program to call Model and return summary of the passed table.
"""

def __call__(self, model: Model, serialized_db: str):
def __call__(self, model: Model, serialized_db: str):
prompt = f"Summarize the table below.\n\n{serialized_db}\n"
# Below we follow the outlines pattern for unconstrained text generation
# https://github.com/outlines-dev/outlines
generator = outlines.generate.text(model.logits_generator)
generator = outlines.generate.text(model.model_obj)
# Finally, return (response, prompt) tuple
# Returning the prompt here allows the underlying BlendSQL classes to track token usage
return (generator(prompt), prompt)
Expand Down

0 comments on commit da799ab

Please sign in to comment.