diff --git a/daprdocs/content/en/reference/api/conversation_api.md b/daprdocs/content/en/reference/api/conversation_api.md index 86c2e32be..3550b63e9 100644 --- a/daprdocs/content/en/reference/api/conversation_api.md +++ b/daprdocs/content/en/reference/api/conversation_api.md @@ -17,7 +17,7 @@ Dapr provides an API to interact with Large Language Models (LLMs) and enables c This endpoint lets you converse with LLMs. ``` -POST /v1.0-alpha1/conversation//converse +POST http://localhost:/v1.0-alpha1/conversation//converse ``` ### URL parameters @@ -44,7 +44,15 @@ Metadata can be sent in the request’s URL. It must be prefixed with `metadata. | `metadata.model` | The Large Language Model you're using. Value depends on which conversation component you're using. `model` is not applicable to the [DeepSeek component]({{< ref deepseek.md >}}). | | `metadata.cacheTTL` | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | +For example, to call for [Anthropic]({{< ref anthropic.md >}}): + +```bash +curl POST http://localhost:3500/v1.0-alpha1/conversation/anthropic/converse?metadata.key=key1&metadata.model=claude-3-5-sonnet-20240620&metadata.cacheTTL=10m +``` + +{{% alert title="Note" color="primary" %}} The metadata parameters available depend on the conversation component you use. [See all the supported components for the conversation API.]({{< ref supported-conversation >}}) +{{% /alert %}} ### Request content @@ -56,7 +64,6 @@ REQUEST = { "model": "model-ID-string-based-on-component-used", "key": "key1", "cacheTTL": "10m", - "endpoint": "http://localhost:3500" } } ``` @@ -67,7 +74,7 @@ Code | Description ---- | ----------- `202` | Accepted `400` | Request was malformed -`500` | Request formatted correctly, error in dapr code or underlying component +`500` | Request formatted correctly, error in Dapr code or underlying component ### Response content @@ -88,4 +95,5 @@ RESPONSE = { ## Next steps -[Conversation API overview]({{< ref conversation-overview.md >}}) \ No newline at end of file +- [Conversation API overview]({{< ref conversation-overview.md >}}) +- [Supported conversation components]({{< ref supported-conversation >}}) \ No newline at end of file