Using Rigging for text completions
chat
-> complete
Chat
-> Completion
ChatPipeline
-> CompletionPipeline
generate_messages
-> generate_texts
Message
objects have been
replaced with basic str
objects for both inputs and outputs.
CompletionPipeline
and use it quickly translate a phrase to 3 different languages.
.with_()
to set stop tokens and prevent the generation from simply continuing until our max tokens are reached. This is a very common and often required pattern when doing completions over chats. Here, we aren’t totally sure what the model might generate after our translation, so we use a few different token sequences to be safe..apply
method as we can easily slot in our inputs without using .add
and following it with our output section of the prompt.