dejanseo commited on
Commit
ae47042
·
verified ·
1 Parent(s): 83e9aa1

Update README.md

Browse files

Format must be user > assistant > user.
Using system > user method gives an error: "An error occurred during link analysis: Conversation roles must alternate user/assistant/user/assistant/..."

Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -123,9 +123,11 @@ If you want to use Hugging Face `transformers` to generate text, you can do some
123
  from transformers import pipeline
124
 
125
  messages = [
126
- {"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
127
- {"role": "user", "content": "Who are you?"},
 
128
  ]
 
129
  chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
130
  chatbot(messages)
131
  ```
 
123
  from transformers import pipeline
124
 
125
  messages = [
126
+ {"role": "user", "content": "What is your favourite condiment?"},
127
+ {"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
128
+ {"role": "user", "content": "Do you have mayonnaise recipes?"}
129
  ]
130
+
131
  chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.3")
132
  chatbot(messages)
133
  ```