@@ -54,7 +54,6 @@ This library currently supports the following generators:
5454### JSON Generation
5555
5656``` python
57- >> > from enum import Enum
5857>> > from pydantic import BaseModel
5958>> > from outlines_haystack.generators.transformers import TransformersJSONGenerator
6059
@@ -66,11 +65,10 @@ This library currently supports the following generators:
6665... model_name = " microsoft/Phi-3-mini-4k-instruct" ,
6766... schema_object = User,
6867... device = " cuda" ,
69- ... sampling_algorithm_kwargs = {" temperature" : 0.5 },
7068... )
7169>> > generator.warm_up()
7270>> > generator.run(prompt = " Create a user profile with the fields name, last_name" )
73- {' structured_replies' : [{ ' name' : ' John' , ' last_name' : ' Doe' } ]}
71+ {' structured_replies' : [' {" name": " John", " last_name": " Doe"} ' ]}
7472```
7573
7674### Choice Generation
@@ -82,7 +80,6 @@ This library currently supports the following generators:
8280... model_name = " microsoft/Phi-3-mini-4k-instruct" ,
8381... choices = [" Positive" , " Negative" ],
8482... device = " cuda" ,
85- ... sampling_algorithm_kwargs = {" temperature" : 0.5 },
8683... )
8784>> > generator.warm_up()
8885>> > generator.run(prompt = " Classify the following statement: 'I love pizza'" )
@@ -101,11 +98,10 @@ This library currently supports the following generators:
10198>> > generator = TransformersTextGenerator(
10299... model_name = " microsoft/Phi-3-mini-4k-instruct" ,
103100... device = " cuda" ,
104- ... sampling_algorithm_kwargs = {" temperature" : 0.5 },
105101... )
106102>> > generator.warm_up()
107103>> > generator.run(prompt = " What is the capital of Italy?" )
108- {' replies' : [' \n\n # Answer \n The capital of Italy is Rome.' ]}
104+ {' replies' : [' The capital of Italy is Rome.' ]}
109105```
110106
111107## License
0 commit comments