Skip to content

Commit e3f1e25

Browse files
committed
Updated README
1 parent 04d9e98 commit e3f1e25

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

android/README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ You can update the SDK's color scheme to match your app's theme as shown below.
280280
AIAgentMessenger.setThemeMode(themeMode) // Options: MessengerThemeMode.Dark, MessengerThemeMode.Light
281281
```
282282
283-
Since apps may allow users to switch themes manually or follow the device's settings, theme updates need to be explicitly called.
283+
Since apps may allow users to switch themes manually or follow the device's settings, theme updates need to be explicitly called.
284284

285285

286286
### Deauthenticate and clear session
@@ -290,4 +290,24 @@ When the user logs out of your app, de-authenticate the SDK to clear session dat
290290
```kotlin
291291
AIAgentMessenger.deauthenticate()
292292
```
293-
293+
294+
295+
### Passing context object to Agent
296+
297+
You can predefine customer-specific information such as country, language, or other custom context data to guide the AI Agent in providing faster and more accurate responses.
298+
299+
This allows for a more personalized and context-aware interaction experience.
300+
301+
> Once the contexts are set, they will be used throughout the conversation to provide personalized and context-aware responses.
302+
303+
```kotlin
304+
AIAgentMessenger.metadata.message.contextObject.put("key1", "value1")
305+
AIAgentMessenger.metadata.message.contextObject.putAll(
306+
mapOf(
307+
"key1" to "value1",
308+
"key2" to "value2"
309+
)
310+
)
311+
AIAgentMessenger.metadata.message.contextObject.remove("key1")
312+
AIAgentMessenger.metadata.message.contextObject.clear()
313+
```

0 commit comments

Comments
 (0)