Unverified Commit a0522de4 authored by lain's avatar lain Committed by GitHub
Browse files

fix ConversationalPipeline docstring (#28091)

parent e6cb8e05
...@@ -215,12 +215,12 @@ class ConversationalPipeline(Pipeline): ...@@ -215,12 +215,12 @@ class ConversationalPipeline(Pipeline):
>>> conversation = Conversation("I'm looking for a movie - what's your favourite one?") >>> conversation = Conversation("I'm looking for a movie - what's your favourite one?")
>>> conversation = chatbot(conversation) >>> conversation = chatbot(conversation)
>>> conversation.messages[-1]["content"] >>> conversation.messages[-1]["content"]
' I don't really have a favorite movie, but I do like action movies. What about you?' "I don't really have a favorite movie, but I do like action movies. What about you?"
>>> conversation.add_message({"role": "user", "content": "That's interesting, why do you like action movies?"}) >>> conversation.add_message({"role": "user", "content": "That's interesting, why do you like action movies?"})
>>> conversation = chatbot(conversation) >>> conversation = chatbot(conversation)
>>> conversation.messages[-1]["content"] >>> conversation.messages[-1]["content"]
' I think it's just because they're so fast-paced and action-fantastic.' " I think it's just because they're so fast-paced and action-fantastic."
``` ```
Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial) Learn more about the basics of using a pipeline in the [pipeline tutorial](../pipeline_tutorial)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment