This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

会话组件规范

与Dapr集成的会话组件

Table headers to note:

HeaderDescriptionExample
StatusComponent certification statusAlpha
Beta
Stable
Component versionThe version of the componentv1
Since runtime versionThe version of the Dapr runtime when the component status was set or updated1.11

Amazon Web Services (AWS)

ComponentStatusComponent versionSince runtime version
AWS BedrockAlphav11.15

Generic

ComponentStatusComponent versionSince runtime version
AnthropicAlphav11.15
DeepSeekAlphav11.15
GoogleAIAlphav11.16
HuggingfaceAlphav11.15
MistralAlphav11.15
OllamaAlphav11.16
OpenAIAlphav11.15

1 -

yaml type: docs title: “AWS Bedrock” linkTitle: “AWS Bedrock” description: AWS Bedrock conversation组件的详细信息

组件格式

一个Dapr conversation.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

规格元数据字段

字段必需详情示例
endpointN组件连接到AWS模拟器的端点。不建议在生产环境中使用。http://localhost:4566
modelN使用的语言模型(LLM)。默认为Amazon的Bedrock默认提供商模型。amazon.titan-text-express-v1
cacheTTLN提示缓存的生存时间(TTL),即缓存过期时间。使用Golang持续时间格式。10m

相关链接

2 - Anthropic

关于Anthropic conversation组件的详细信息

组件格式

一个Dapr conversation.yaml 组件文件的结构如下:

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: anthropic
spec:
  type: conversation.anthropic
  metadata:
  - name: key
    value: "mykey"
  - name: model
    value: claude-3-5-sonnet-20240620
  - name: cacheTTL
    value: 10m

元数据字段说明

字段必需详情示例
keyYAnthropic的API密钥。"mykey"
modelN要使用的Anthropic LLM。默认为claude-3-5-sonnet-20240620claude-3-5-sonnet-20240620
cacheTTLN提示缓存的过期时间。使用Golang的持续时间格式。10m

相关链接

3 - Huggingface

Huggingface 对话组件的详细信息

组件格式

一个 Dapr conversation.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

元数据字段说明

字段必需详情示例
keyYHuggingface 的 API 密钥。mykey
modelN要使用的 Huggingface LLM。默认为 meta-llama/Meta-Llama-3-8Bmeta-llama/Meta-Llama-3-8B
cacheTTLN提示缓存的过期时间。使用 Golang 持续时间格式。10m

相关链接

4 - Mistral

Mistral 会话组件的详细信息

组件格式

一个 Dapr conversation.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

规格元数据字段

字段必需详情示例
keyYMistral 的 API 密钥。mykey
modelN要使用的 Mistral LLM 模型。默认为 open-mistral-7bopen-mistral-7b
cacheTTLN提示缓存的有效期,使用 Golang 的持续时间格式。10m

相关链接

5 - OpenAI

OpenAI conversation组件的详细信息

组件格式说明

一个Dapr conversation.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

规格元数据说明

字段必需详情示例
keyOpenAI的API密钥。mykey
model要使用的OpenAI语言模型。默认为gpt-4-turbogpt-4-turbo
cacheTTL提示缓存的有效期。使用Golang的时间格式表示。10m

相关链接