You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: daprdocs/content/en/developing-applications/building-blocks/conversation/conversation-overview.md
+20-5
Original file line number
Diff line number
Diff line change
@@ -10,18 +10,33 @@ description: "Overview of the conversation API building block"
10
10
The conversation API is currently in [alpha]({{< ref "certification-lifecycle.md#certification-levels" >}}).
11
11
{{% /alert %}}
12
12
13
+
Dapr's conversation API reduces the complexity of securely and reliably interacting with Large Language Models (LLM) at scale. Whether you're a developer who doesn't have the necessary native SDKs or a polyglot shop who just wants to focus on the prompt aspects of LLM interactions, the conversation API provides one consistent API entry point to talk to underlying LLM providers.
13
14
14
-
Using the Dapr conversation API, you can reduce the complexity of interacting with Large Language Models (LLMs) and enable critical performance and security functionality with features like prompt caching and personally identifiable information (PII) data obfuscation.
15
+
<imgsrc="/images/conversation-overview.png"width=800alt="Diagram showing the flow of a user's app communicating with Dapr's LLM components.">
16
+
17
+
In additon to enabling critical performance and security functionality (like [prompt caching]({{< ref "#prompt-caching" >}}) and [PII scrubbing]({{< ref "#personally-identifiable-information-pii-obfuscation" >}})), you can also pair the conversation API with Dapr functionalities, like:
18
+
- Resiliency circuit breakers and retries to circumvent limit and token errors, or
19
+
- Middleware to authenticate requests coming to and from the LLM
20
+
21
+
Dapr provides observability by issuing metrics for your LLM interactions.
15
22
16
23
## Features
17
24
25
+
The following features are out-of-the-box for [all the supported conversation components]({{< ref supported-conversation >}}).
26
+
18
27
### Prompt caching
19
28
20
-
To significantly reduce latency and cost, frequent prompts are stored in a cache to be reused, instead of reprocessing the information for every new request. Prompt caching optimizes performance by storing and reusing prompts that are often repeated across multiple API calls.
29
+
Prompt caching optimizes performance by storing and reusing prompts that are often repeated across multiple API calls. To significantly reduce latency and cost, Dapr stores frequent prompts in a local cache to be reused by your cluster, pod, or other, instead of reprocessing the information for every new request.
21
30
22
31
### Personally identifiable information (PII) obfuscation
23
32
24
-
The PII obfuscation feature identifies and removes any PII from a conversation response. This feature protects your privacy by eliminating sensitive details like names, addresses, phone numbers, or other details that could be used to identify an individual.
33
+
The PII obfuscation feature identifies and removes any form of sensitve user information from a conversation response. Simply enable PII obfuscation on input and output data to protect your privacy and scrub sensitive details that could be used to identify an individual.
34
+
35
+
## Demo
36
+
37
+
Watch the demo presented during [Diagrid's Dapr v1.15 celebration](https://www.diagrid.io/videos/dapr-1-15-deep-dive) to see how the conversation API works using the .NET SDK.
38
+
39
+
<iframewidth="560"height="315"src="https://www.youtube-nocookie.com/embed/NTnwoDhHIcQ?si=37SDcOHtEpgCIwkG&start=5444"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerpolicy="strict-origin-when-cross-origin"allowfullscreen></iframe>
25
40
26
41
## Try out conversation
27
42
@@ -31,7 +46,7 @@ Want to put the Dapr conversation API to the test? Walk through the following qu
31
46
32
47
| Quickstart/tutorial | Description |
33
48
| ------------------- | ----------- |
34
-
|[Conversation quickstart](todo)|.|
49
+
|[Conversation quickstart](todo)|TODO|
35
50
36
51
### Start using the conversation API directly in your app
37
52
@@ -40,4 +55,4 @@ Want to skip the quickstarts? Not a problem. You can try out the conversation bu
40
55
## Next steps
41
56
42
57
-[How-To: Converse with an LLM using the conversation API]({{< ref howto-conversation-layer.md >}})
43
-
-[Conversation API components]({{< ref supported-conversation >}})
58
+
-[Conversation API components]({{< ref supported-conversation >}})
Copy file name to clipboardexpand all lines: daprdocs/content/en/developing-applications/building-blocks/jobs/howto-schedule-and-handle-triggered-jobs.md
+100-62
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
type: docs
3
3
title: "How-To: Schedule and handle triggered jobs"
4
4
linkTitle: "How-To: Schedule and handle triggered jobs"
5
-
weight: 2000
5
+
weight: 5000
6
6
description: "Learn how to use the jobs API to schedule and handle triggered jobs"
7
7
---
8
8
@@ -20,7 +20,103 @@ When you [run `dapr init` in either self-hosted mode or on Kubernetes]({{< ref i
20
20
21
21
In your code, set up and schedule jobs within your application.
22
22
23
-
{{< tabs "Go" >}}
23
+
{{< tabs ".NET" "Go" >}}
24
+
25
+
{{% codetab %}}
26
+
27
+
<!-- .NET -->
28
+
29
+
The following .NET SDK code sample schedules the job named `prod-db-backup`. The job data contains information
30
+
about the database that you'll be seeking to backup regularly. Over the course of this example, you'll:
31
+
- Define types used in the rest of the example
32
+
- Register an endpoint during application startup that handles all job trigger invocations on the service
33
+
- Register the job with Dapr
34
+
35
+
In the following example, you'll create records that you'll serialize and register alongside the job so the information
36
+
is available when the job is triggered in the future:
37
+
- The name of the backup task (`db-backup`)
38
+
- The backup task's `Metadata`, including:
39
+
- The database name (`DBName`)
40
+
- The database location (`BackupLocation`)
41
+
42
+
Create an ASP.NET Core project and add the latest version of `Dapr.Jobs` from NuGet.
43
+
44
+
> **Note:** While it's not strictly necessary
45
+
for your project to use the `Microsoft.NET.Sdk.Web` SDK to create jobs, as of the time this documentation is authored,
46
+
only the service that schedules a job receives trigger invocations for it. As those invocations expect an endpoint
47
+
that can handle the job trigger and requires the `Microsoft.NET.Sdk.Web` SDK, it's recommended that you
48
+
use an ASP.NET Core project for this purpose.
49
+
50
+
Start by defining types to persist our backup job data and apply our own JSON property name attributes to the properties
51
+
so they're consistent with other language examples.
52
+
53
+
```cs
54
+
//Define the types that we'll represent the job data with
0 commit comments