Skip to content

Commit 8a87086

Browse files
authored
chore: clarify aiContext vs metadata` (#8338)
1 parent bffe559 commit 8a87086

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Example conversation data
117117
*/
118118
```
119119

120-
You can optionally attach a `name` and `metadata` to a conversation by passing them as arguments to the `.create()` method. There are no uniqueness constraints on conversation `name` or `metadata` values.
120+
You can optionally attach a `name` and `metadata` to a conversation by passing them as arguments to the `.create()` method. There are no uniqueness constraints on conversation `name` or `metadata` values. You can use `metadata` as a way to organize chats and group them into certain topics.
121121

122122
```ts
123123
const { data: chat, errors } = await client.conversations.chat.create({

src/pages/[platform]/ai/conversation/context/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export function getStaticProps(context) {
3232

3333
For LLMs to provide high-quality answers to users' questions, they need to have the right information. Sometimes this information is contextual, based on the user or the state of the application. To allow for this, you can send `aiContext` with any user message to the LLM, which can be any unstructured or structured data that might be useful.
3434

35+
> Note: `aiContext` is available during the chat and is passed to the LLM, however `metadata` is not available to the chat or passed to the LLM.
36+
3537
<InlineFilter filters={["javascript","vue","angular"]}>
3638

3739
```ts

0 commit comments

Comments
 (0)