From c591ceb51fff20a9b56cbaf905536987bbd738c7 Mon Sep 17 00:00:00 2001 From: Hannah Hunter Date: Tue, 5 Nov 2024 16:09:10 -0500 Subject: [PATCH] update specs Signed-off-by: Hannah Hunter --- .../supported-conversational/anthropic.md | 2 +- .../supported-conversational/aws-bedrock.md | 38 +++++++++++++++- .../supported-conversational/echo.md | 6 --- .../supported-conversational/hugging-face.md | 44 +++++++++++++++++-- .../supported-conversational/mistral.md | 38 +++++++++++++++- .../supported-conversational/openai.md | 38 +++++++++++++++- .../components/conversational/generic.yaml | 11 ++--- 7 files changed, 155 insertions(+), 22 deletions(-) delete mode 100644 daprdocs/content/en/reference/components-reference/supported-conversational/echo.md diff --git a/daprdocs/content/en/reference/components-reference/supported-conversational/anthropic.md b/daprdocs/content/en/reference/components-reference/supported-conversational/anthropic.md index e9ff0607512..422a69b036d 100644 --- a/daprdocs/content/en/reference/components-reference/supported-conversational/anthropic.md +++ b/daprdocs/content/en/reference/components-reference/supported-conversational/anthropic.md @@ -7,7 +7,7 @@ description: Detailed information on the Anthropic conversational component ## Component format -A Dapr `conversaion.yaml` component file has the following structure: +A Dapr `conversation.yaml` component file has the following structure: ```yaml apiVersion: dapr.io/v1alpha1 diff --git a/daprdocs/content/en/reference/components-reference/supported-conversational/aws-bedrock.md b/daprdocs/content/en/reference/components-reference/supported-conversational/aws-bedrock.md index 41c7b978ad7..b72c0f7fcb6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-conversational/aws-bedrock.md +++ b/daprdocs/content/en/reference/components-reference/supported-conversational/aws-bedrock.md @@ -3,4 +3,40 @@ type: docs title: "AWS Bedrock" linkTitle: "AWS Bedrock" description: Detailed information on the AWS Bedrock conversational component ---- \ No newline at end of file +--- + +## Component format + +A Dapr `conversation.yaml` component file has the following structure: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: awsbedrock +spec: + type: conversation.aws.bedrock + metadata: + - name: endpoint + value: "http://localhost:4566" + - name: model + value: amazon.titan-text-express-v1 + - name: cacheTTL + value: 10m +``` + +{{% alert title="Warning" color="warning" %}} +The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described [here]({{< ref component-secrets.md >}}). +{{% /alert %}} + +## Spec metadata fields + +| Field | Required | Details | Example | +|--------------------|:--------:|---------|---------| +| `endpoint` | N | AWS endpoint for the component to use and connect to emulators. Not recommended for production AWS use. | `http://localhost:4566` | +| `model` | N | The LLM to use. Defaults to Bedrock's default provider model from Amazon. | `amazon.titan-text-express-v1` | +| `cacheTTL` | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | `10m` | + +## Related links + +- [Conversational API overview]({{< ref conversational-overview.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/reference/components-reference/supported-conversational/echo.md b/daprdocs/content/en/reference/components-reference/supported-conversational/echo.md deleted file mode 100644 index 6921a1967d8..00000000000 --- a/daprdocs/content/en/reference/components-reference/supported-conversational/echo.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -type: docs -title: "Echo" -linkTitle: "Echo" -description: Detailed information on the Echo conversational component ---- \ No newline at end of file diff --git a/daprdocs/content/en/reference/components-reference/supported-conversational/hugging-face.md b/daprdocs/content/en/reference/components-reference/supported-conversational/hugging-face.md index 517b8a93324..57cc3de3d5f 100644 --- a/daprdocs/content/en/reference/components-reference/supported-conversational/hugging-face.md +++ b/daprdocs/content/en/reference/components-reference/supported-conversational/hugging-face.md @@ -1,6 +1,42 @@ --- type: docs -title: "Hugging Face" -linkTitle: "Hugging Face" -description: Detailed information on the Hugging Face conversational component ---- \ No newline at end of file +title: "Huggingface" +linkTitle: "Huggingface" +description: Detailed information on the Huggingface conversational component +--- + +## Component format + +A Dapr `conversation.yaml` component file has the following structure: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: huggingface +spec: + type: conversation.huggingface + metadata: + - name: key + value: mykey + - name: model + value: meta-llama/Meta-Llama-3-8B + - name: cacheTTL + value: 10m +``` + +{{% alert title="Warning" color="warning" %}} +The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described [here]({{< ref component-secrets.md >}}). +{{% /alert %}} + +## Spec metadata fields + +| Field | Required | Details | Example | +|--------------------|:--------:|---------|---------| +| `key` | Y | API key for Huggingface. | `mykey` | +| `model` | N | The Huggingface LLM to use. Defaults to `meta-llama/Meta-Llama-3-8B`. | `meta-llama/Meta-Llama-3-8B` | +| `cacheTTL` | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | `10m` | + +## Related links + +- [Conversational API overview]({{< ref conversational-overview.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/reference/components-reference/supported-conversational/mistral.md b/daprdocs/content/en/reference/components-reference/supported-conversational/mistral.md index 0ce6cbcc9a4..c4f162ac14c 100644 --- a/daprdocs/content/en/reference/components-reference/supported-conversational/mistral.md +++ b/daprdocs/content/en/reference/components-reference/supported-conversational/mistral.md @@ -3,4 +3,40 @@ type: docs title: "Mistral" linkTitle: "Mistral" description: Detailed information on the Mistral conversational component ---- \ No newline at end of file +--- + +## Component format + +A Dapr `conversation.yaml` component file has the following structure: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: mistral +spec: + type: conversation.mistral + metadata: + - name: key + value: mykey + - name: model + value: open-mistral-7b + - name: cacheTTL + value: 10m +``` + +{{% alert title="Warning" color="warning" %}} +The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described [here]({{< ref component-secrets.md >}}). +{{% /alert %}} + +## Spec metadata fields + +| Field | Required | Details | Example | +|--------------------|:--------:|---------|---------| +| `key` | Y | API key for Mistral. | `mykey` | +| `model` | N | The Mistral LLM to use. Defaults to `open-mistral-7b`. | `open-mistral-7b` | +| `cacheTTL` | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | `10m` | + +## Related links + +- [Conversational API overview]({{< ref conversational-overview.md >}}) \ No newline at end of file diff --git a/daprdocs/content/en/reference/components-reference/supported-conversational/openai.md b/daprdocs/content/en/reference/components-reference/supported-conversational/openai.md index c15198ee951..fdbaf18a630 100644 --- a/daprdocs/content/en/reference/components-reference/supported-conversational/openai.md +++ b/daprdocs/content/en/reference/components-reference/supported-conversational/openai.md @@ -3,4 +3,40 @@ type: docs title: "OpenAI" linkTitle: "OpenAI" description: Detailed information on the OpenAI conversational component ---- \ No newline at end of file +--- + +## Component format + +A Dapr `conversation.yaml` component file has the following structure: + +```yaml +apiVersion: dapr.io/v1alpha1 +kind: Component +metadata: + name: openai +spec: + type: conversation.openai + metadata: + - name: key + value: mykey + - name: model + value: gpt-4-turbo + - name: cacheTTL + value: 10m +``` + +{{% alert title="Warning" color="warning" %}} +The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets, as described [here]({{< ref component-secrets.md >}}). +{{% /alert %}} + +## Spec metadata fields + +| Field | Required | Details | Example | +|--------------------|:--------:|---------|---------| +| `key` | Y | API key for OpenAI. | `mykey` | +| `model` | N | The OpenAI LLM to use. Defaults to `gpt-4-turbo`. | `gpt-4-turbo` | +| `cacheTTL` | N | A time-to-live value for a prompt cache to expire. Uses Golang duration format. | `10m` | + +## Related links + +- [Conversational API overview]({{< ref conversational-overview.md >}}) \ No newline at end of file diff --git a/daprdocs/data/components/conversational/generic.yaml b/daprdocs/data/components/conversational/generic.yaml index d99b5e23ba6..26cf8431ce3 100644 --- a/daprdocs/data/components/conversational/generic.yaml +++ b/daprdocs/data/components/conversational/generic.yaml @@ -1,9 +1,9 @@ -- component: Echo - link: echo +- component: Anthropic + link: anthropic state: Alpha version: v1 since: "1.15" -- component: Hugging Face +- component: Huggingface link: hugging-face state: Alpha version: v1 @@ -18,8 +18,3 @@ state: Alpha version: v1 since: "1.15" -- component: Anthropic - link: anthropic - state: Alpha - version: v1 - since: "1.15" \ No newline at end of file