Skip to content

Commit

Permalink
update specs
Browse files Browse the repository at this point in the history
Signed-off-by: Hannah Hunter <[email protected]>
  • Loading branch information
hhunter-ms committed Nov 5, 2024
1 parent e1fcc09 commit c591ceb
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,40 @@ type: docs
title: "AWS Bedrock"
linkTitle: "AWS Bedrock"
description: Detailed information on the AWS Bedrock conversational component
---
---

## 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 >}})

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,42 @@
---
type: docs
title: "Hugging Face"
linkTitle: "Hugging Face"
description: Detailed information on the Hugging Face conversational component
---
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 >}})
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,40 @@ type: docs
title: "Mistral"
linkTitle: "Mistral"
description: Detailed information on the Mistral conversational component
---
---

## 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 >}})
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,40 @@ type: docs
title: "OpenAI"
linkTitle: "OpenAI"
description: Detailed information on the OpenAI conversational component
---
---

## 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 >}})
11 changes: 3 additions & 8 deletions daprdocs/data/components/conversational/generic.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,8 +18,3 @@
state: Alpha
version: v1
since: "1.15"
- component: Anthropic
link: anthropic
state: Alpha
version: v1
since: "1.15"

0 comments on commit c591ceb

Please sign in to comment.