some edits

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
Hannah Hunter 2025-02-14 13:08:22 -05:00
parent e5c0ad3b2a
commit e9886d53b4
1 changed files with 12 additions and 4 deletions

View File

@ -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/<llm-name>/converse
POST http://localhost:<daprPort>/v1.0-alpha1/conversation/<llm-name>/converse
```
### URL parameters
@ -44,7 +44,15 @@ Metadata can be sent in the requests 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 >}})
- [Conversation API overview]({{< ref conversation-overview.md >}})
- [Supported conversation components]({{< ref supported-conversation >}})