Skip to content

Commit b90423b

Browse files
authored
update aiContext sample (#8326)
1 parent 17ae24e commit b90423b

File tree

1 file changed

+4
-3
lines changed
  • src/pages/[platform]/ai/conversation/connect-your-frontend

1 file changed

+4
-3
lines changed

src/pages/[platform]/ai/conversation/connect-your-frontend/index.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,12 @@ const { data: message, errors } = await chat.sendMessage({
303303
The `aiContext` argument allows you to optionally attach arbitrary data to the message. This is useful for passing additional information, like user information or current state of your application, in a user message to the AI assistant.
304304

305305
```ts
306-
const { data: message, errors } = await chat.sendMessage('Hello, world!', {
306+
const { data: message, errors } = await chat.sendMessage({
307+
content: [{ text: 'Hello, world!' }],
307308
aiContext: {
308309
user: {
309-
name: 'Ian',
310-
},
310+
name: "Dan"
311+
}
311312
},
312313
});
313314
```

0 commit comments

Comments
 (0)