Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
a0522de4
Unverified
Commit
a0522de4
authored
Dec 18, 2023
by
lain
Committed by
GitHub
Dec 18, 2023
Browse files
fix ConversationalPipeline docstring (#28091)
parent
e6cb8e05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/pipelines/conversational.py
src/transformers/pipelines/conversational.py
+2
-2
No files found.
src/transformers/pipelines/conversational.py
View file @
a0522de4
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment