# ConversationAdapter (@salmonui/chat/conversation)

> The ConversationAdapter type of @salmonui/chat/conversation: Bot and assistant replies: a Promise is one final response, an AsyncIterable streams text chunks and response parts. The signal aborts on Stop, api.stop(), a new send and unmount.

Canonical: https://salmonui.dev/docs/reference/chat/conversation/ConversationAdapter

```ts
import type { ConversationAdapter } from '@salmonui/chat/conversation';
```

Entry index: https://salmonui.dev/docs/reference/chat/conversation (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/chat/conversation.md).

## Reference

Kind: type

```ts
type ConversationAdapter = (request: ConversationRequest, context: {
    readonly signal: AbortSignal;
}) => Promise<string> | AsyncIterable<string | ConversationResponsePart>;
```

Bot and assistant replies: a Promise is one final
response, an AsyncIterable streams text chunks and response parts. The
`signal` aborts on Stop, `api.stop()`, a new send and unmount.
