You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recommended way to integrate the assistant API into your application is with the `useChat` hook from [Vercel's AI SDK](https://sdk.vercel.ai/docs).
8
+
The `useChat` hook from Vercel's AI SDK is the recommended way to integrate the assistant API into your application.
9
+
10
+
<Note>
11
+
The Mintlify assistant API is compatible with **AI SDK v4**. If you use AI SDK v5 or later, you must configure a custom transport.
12
+
</Note>
9
13
10
14
<Steps>
11
-
<Steptitle="Install the AI SDK">
15
+
<Steptitle="Install AI SDK v4">
12
16
13
17
```bash
14
-
npm i ai
18
+
npm i ai@^4.1.15
15
19
```
16
20
17
21
</Step>
@@ -28,9 +32,7 @@ function MyComponent({ domain }) {
28
32
},
29
33
body: {
30
34
fp: 'anonymous',
31
-
messages: [
32
-
{ role: 'user', content: 'What is this documentation about?' }
33
-
]
35
+
retrievalPageSize: 5,
34
36
},
35
37
streamProtocol: 'data',
36
38
sendExtraMessageFields: true,
@@ -53,6 +55,12 @@ function MyComponent({ domain }) {
53
55
}
54
56
```
55
57
58
+
**Required configuration for Mintlify:**
59
+
-`streamProtocol: 'data'` - Required for streaming responses.
60
+
-`sendExtraMessageFields: true` - Required to send message metadata.
61
+
-`body.fp` - Fingerprint identifier (use 'anonymous' or a user identifier).
62
+
-`body.retrievalPageSize` - Number of search results to use (recommended: 5).
Copy file name to clipboardExpand all lines: discovery-openapi.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@
47
47
"properties": {
48
48
"fp": {
49
49
"type": "string",
50
-
"description": "Browser fingerprint or arbitrary string identifier. There may be future functionality which allows you to get the messages for a given fingerprint"
50
+
"description": "Fingerprint identifier for tracking conversation sessions. Use 'anonymous' for anonymous users or provide a unique user identifier."
51
51
},
52
52
"threadId": {
53
53
"default": null,
@@ -381,7 +381,7 @@
381
381
"retrievalPageSize": {
382
382
"type": "number",
383
383
"default": 5,
384
-
"description": "Number of retrieval results to return"
384
+
"description": "Number of documentation search results to use for generating the response. Higher values provide more context but may increase response time. Recommended: 5."
@@ -8,6 +8,8 @@ The [navigation](/organize/settings#param-navigation) property in `docs.json` co
8
8
9
9
With proper navigation configuration, you can organize your content so that users can find exactly what they're looking for.
10
10
11
+
Choose one primary organizational pattern at the root level of your navigation. Once you've chosen your primary pattern, you can nest other navigation elements within it.
12
+
11
13
## Pages
12
14
13
15
Pages are the most fundamental navigation component. Each page is an MDX file in your documentation repository.
@@ -173,6 +175,8 @@ Menus add dropdown navigation items to a tab. Use menus to help users go directl
173
175
174
176
In the `navigation` object, `menu` is an array where each entry is an object that requires an `item` field and can contain other navigation fields such as groups, pages, icons, or links to external pages.
175
177
178
+
Menu items can only contain groups, pages, and external links.
179
+
176
180
```json
177
181
{
178
182
"navigation": {
@@ -262,9 +266,13 @@ In the `navigation` object, `anchors` is an array where each entry is an object
262
266
}
263
267
```
264
268
265
-
For anchors that direct to external links only, use the `global` keyword. Anchors in a `global` object must have an `href` field and cannot point to a relative path.
269
+
### Global anchors
266
270
267
-
Global anchors are particularly useful for linking to resources that are not part of your documentation, but should be readily accessible to your users like a blog or support portal.
271
+
Use global anchors for external links that should appear on all pages, regardless of which section of your navigation the user is viewing. Global anchors are particularly useful for linking to resources outside your documentation, such as a blog, community forum, or support portal.
272
+
273
+
<Note>
274
+
Global anchors must include an `href` field pointing to an external URL. They cannot contain relative paths.
275
+
</Note>
268
276
269
277
```json
270
278
{
@@ -561,37 +569,37 @@ For automated translations, [contact our sales team](mailto:[email protected]) to
561
569
562
570
## Nesting
563
571
564
-
You can use any combination of anchors, tabs, dropdowns, and products. The components can be nested within each other interchangeably to create your desired navigation structure.
572
+
Navigation elements can be nested within each other to create complex hierarchies. You must have one root-level parent navigation element such as tabs, groups, or a dropdown. You can nest other types of navigation elements within your primary navigation pattern.
573
+
574
+
Each navigation element can contain one type of child element at each level of your navigation hierarchy. For example, a tab can contain anchors that contain groups, but a tab cannot contain both anchors and groups at the same level.
565
575
566
576
<CodeGroup>
567
577
568
-
```jsonAnchors
578
+
```jsonTabs containing anchors
569
579
{
570
580
"navigation": {
571
-
"anchors": [
581
+
"tabs": [
572
582
{
573
-
"anchor": "Anchor 1",
574
-
"groups": [
583
+
"tab": "Documentation",
584
+
"anchors": [
575
585
{
576
-
"group": "Group 1",
577
-
"pages": [
578
-
"some-folder/file-1",
579
-
"another-folder/file-2",
580
-
"just-a-file"
581
-
]
586
+
"anchor": "Guides",
587
+
"icon": "book-open",
588
+
"pages": ["quickstart", "tutorial"]
589
+
},
590
+
{
591
+
"anchor": "API Reference",
592
+
"icon": "code",
593
+
"pages": ["api/overview", "api/endpoints"]
582
594
}
583
595
]
584
596
},
585
597
{
586
-
"anchor": "Anchor 2",
598
+
"tab": "Resources",
587
599
"groups": [
588
600
{
589
-
"group": "Group 2",
590
-
"pages": [
591
-
"some-other-folder/file-1",
592
-
"various-different-folders/file-2",
593
-
"another-file"
594
-
]
601
+
"group": "Help",
602
+
"pages": ["support", "faq"]
595
603
}
596
604
]
597
605
}
@@ -600,34 +608,130 @@ You can use any combination of anchors, tabs, dropdowns, and products. The compo
0 commit comments