Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

firstSentence.md

24 lines511 Bytes

1---
2id: firstSentence
3title: firstSentence
4---
5​
6```ts
7function firstSentence(text): string;
8```
9​
10Defined in: [packages/ai/src/activities/chat/tools/lazy-tools.ts:8](https://github.com/TanStack/ai/blob/main/packages/ai/src/activities/chat/tools/lazy-tools.ts#L8)
11​
12Extract the first sentence of a description (up to the first ., !, or ?
13followed by whitespace or end-of-string). Falls back to the whole trimmed
14string when there is no sentence terminator.
15​
16## Parameters
17​
18### text
19​
20`string`
21​
22## Returns
23​
24`string`