File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ Instead of a Pydantic model you can pass a string that represents a [JSON Schema
5555from pydantic import BaseModel
5656
5757from outlines import models
58- from outlines import text
58+ from outlines import generate
5959
6060model = models.transformers(" mistralai/Mistral-7B-v0.1" )
6161
@@ -85,13 +85,13 @@ Outlines can infer the structure of the output from the signature of a function.
8585
8686``` python
8787from outlines import models
88- from outlines import text
88+ from outlines import generate
8989
9090def add (a : int , b : int ):
9191 return a + b
9292
9393model = models.transformers(" mistralai/Mistral-7B-v0.1" )
94- generator = text. generate.json(model, add)
94+ generator = generate.json(model, add)
9595result = generator(" Return two integers named a and b respectively. a is odd and b even." )
9696
9797print (add(** result))
You can’t perform that action at this time.
0 commit comments