Conversation
Use DaprClient.conversation to send messages to a large language model through a Dapr conversation component. The JavaScript SDK supports the Conversation Alpha2 API over HTTP and gRPC, including message history, function tool calls, structured output, PII scrubbing, prompt cache retention, and token usage statistics.
These guides target @dapr/dapr 3.19.0 or later. The underlying Conversation API is alpha. Basic Alpha2 requests require Dapr runtime 1.16 or later; some options require newer runtimes and support from the selected component and model.
| Guide | Description |
|---|---|
| How to: Converse with an LLM | Install the package, configure a component, and send your first request. |
| Conversation client usage | Configure the client, work with messages and responses, and use advanced request options. |
| How to: Call tools | Define functions, validate model-generated arguments, and return tool results to the model. |
How to: Converse with an LLM
Configure a conversation component and send messages using the Dapr JavaScript SDK
Learn more →
Conversation client usage
Configure conversation requests, message history, structured output, caching, and response handling in JavaScript
Learn more →
How to: Call tools
Define conversation tools, validate function arguments, and send tool results back to an LLM in JavaScript
Learn more →