Skip to content

Commit 1d363d5

Browse files
authored
Update README.md
1 parent 9c102ab commit 1d363d5

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ print(chat) # {'message': "It's been great! How about yours?", 'time': '11', 'e
113113
```
114114

115115

116-
### Context
116+
#### Context
117117
YouDotCom's YouChat feature is a powerful tool that allows for context to be utilized in your conversations. By passing a list or a file in the JSON format, you can provide the chatbot with additional information to better understand and respond to your questions.
118118

119-
To use the context option, you can change the way you send your message by using the `Chat.send_message` method. This method allows you to pass in a driver, a message, and a context_form_file or a context parameter.
119+
To use the context option, you can change the way you send your message by changing the `Chat.send_message` method. This method allows you to pass in a driver, a message, and a context_form_file or a context parameter.
120120

121121
For example, if you want to use a file, you can pass the file name as the `context_form_file` parameter, like this:
122122

@@ -133,7 +133,20 @@ Chat.send_message(driver=driver, message="YOUR QUESTION HERE", context=['context
133133
```
134134

135135
By providing context to your conversations, you can expect more accurate and personalized responses from YouChat, which can help to improve your overall experience.
136-
136+
137+
The following is an example of a JSON file that can be used as the `context_form_file` parameter in the `Chat.send_message` method:
138+
139+
```json
140+
{
141+
"context": [
142+
"my name is test",
143+
"i love coding",
144+
"my hobby's are making pictures in nature"
145+
]
146+
}
147+
```
148+
149+
In this example, the `context` field contains an array of strings that provide additional information about the user. The strings can include any relevant information that could help the chatbot understand the context of the conversation.
137150

138151

139152
</details>

0 commit comments

Comments
 (0)