Open History to see the last commit
1---
2id: firstSentence
3title: firstSentence
4---
5
6# Function: firstSentence()
7
8```ts
9function firstSentence(text): string;
10```
11
12Defined 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)
13
14Extract the first sentence of a description (up to the first ., !, or ?
15followed by whitespace or end-of-string). Falls back to the whole trimmed
16string when there is no sentence terminator.
17
18## Parameters
19
20### text
21
22`string`
23
24## Returns
25
26`string`