Skip to content

Commit 7bed093

Browse files
committed
fix document typo
1 parent 1d874d2 commit 7bed093

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/chat-ui/parts.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,18 +476,18 @@ function CustomPartComponent() {
476476
}
477477
```
478478

479-
### extractAllPartData Function
479+
### getParts Function
480480

481481
Extract all parts of a specific type from a message:
482482

483483
```tsx
484-
import { extractAllPartData } from '@llamaindex/chat-ui'
484+
import { getParts } from '@llamaindex/chat-ui'
485485

486486
// Get all text content from a message
487-
const allTextParts = extractAllPartData<string>(message, 'text')
487+
const allTextParts = getParts<string>(message, 'text')
488488

489489
// Get all weather data parts
490-
const allWeatherData = extractAllPartData<WeatherData>(message, 'data-weather')
490+
const allWeatherData = getParts<WeatherData>(message, 'data-weather')
491491
```
492492

493493
This function is useful for:

0 commit comments

Comments
 (0)