From 11bd915e187fa2bc46e375a267665bd72fd952f0 Mon Sep 17 00:00:00 2001 From: Marc Lelarge Date: Wed, 12 Jul 2023 21:59:50 +0200 Subject: [PATCH] debug --- docs/source/overview.rst | 2 +- outlines/text/prompts.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/overview.rst b/docs/source/overview.rst index 224971fed..3a084a386 100644 --- a/docs/source/overview.rst +++ b/docs/source/overview.rst @@ -18,7 +18,7 @@ Here is a simple Outlines program that highlights some of its key features: hello_world = where_from("Hello world") foobar = where_from("Foo Bar") - answer = complete([hello_world, foobar], num_samples=3, stop_at=["."]) + answer = complete([hello_world, foobar], samples=3, stop_at=["."]) - **Prompt management**. You can use functions with the ``@outlines.text.prompt`` decorator. "Prompt functions" use the `Jinja templating language `_ to render the prompt written in the docstring. We also added a few filters to help with common worflows, like building agents. Of course, for simple prompts, you can also use Python strings directly. diff --git a/outlines/text/prompts.py b/outlines/text/prompts.py index 8b3d5eba3..7b2a6e8dc 100644 --- a/outlines/text/prompts.py +++ b/outlines/text/prompts.py @@ -284,7 +284,7 @@ def get_schema_dict(model: Dict): @get_schema.register(type(BaseModel)) -def get_schema_pydantic(model: type[BaseModel]): +def get_schema_pydantic(model: type(BaseModel)): """Return the schema of a Pydantic model.""" if not type(model) == type(BaseModel): raise TypeError("The `schema` filter only applies to Pydantic models.")