ContentParts
Namespace: Vercel.AI.GenerateText
public static class ContentPartsReads text and reasoning out of generated content. Maps to extractTextContent and extractReasoningContent.
Inheritance: object
Methods
Section titled “Methods”ExtractReasoningContent(IReadOnlyList<GeneratedContent>?)
Section titled “ExtractReasoningContent(IReadOnlyList<GeneratedContent>?)”public static string? ExtractReasoningContent(IReadOnlyList<GeneratedContent>? content)Joins reasoning parts with newlines. Returns null when there are none.
Parameters
| Name | Type | Description |
|---|---|---|
content |
IReadOnlyList<GeneratedContent> |
Returns: string
ExtractTextContent(IReadOnlyList<GeneratedContent>?)
Section titled “ExtractTextContent(IReadOnlyList<GeneratedContent>?)”public static string? ExtractTextContent(IReadOnlyList<GeneratedContent>? content)Joins text parts. Returns null when there are none.
Parameters
| Name | Type | Description |
|---|---|---|
content |
IReadOnlyList<GeneratedContent> |
Returns: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product