Skip to content

Commit c9bd526

Browse files
Fix things
1 parent 12acdd4 commit c9bd526

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

examples/pom.xml

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@
119119
<artifactId>dapr-sdk</artifactId>
120120
<version>${project.version}</version>
121121
</dependency>
122+
<dependency>
123+
<groupId>io.dapr</groupId>
124+
<artifactId>dapr-sdk-ai</artifactId>
125+
<version>${project.version}</version>
126+
</dependency>
122127
<dependency>
123128
<groupId>com.evanlennick</groupId>
124129
<artifactId>retry4j</artifactId>

examples/src/main/java/io/dapr/examples/conversation/DemoConversationAI.java

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package io.dapr.examples.conversation;
22

3+
import io.dapr.ai.client.DaprConversationClient;
4+
import io.dapr.ai.client.DaprConversationInput;
5+
import io.dapr.ai.client.DaprConversationResponse;
36
import io.dapr.v1.DaprProtos;
47
import reactor.core.publisher.Mono;
58

@@ -11,18 +14,17 @@ public class DemoConversationAI {
1114
* The main method to start the client.
1215
*
1316
* @param args Input arguments (unused).
14-
* @throws InterruptedException If program has been interrupted.
1517
*/
1618
public static void main(String[] args) {
1719
try (DaprConversationClient client = new DaprConversationClient(null)) {
1820
DaprConversationInput daprConversationInput = new DaprConversationInput("11");
19-
Mono<DaprProtos.ConversationResponse> instanceId = client.converse("openai", new ArrayList<>(Collections.singleton(daprConversationInput)), null, null, null, false, 0.0d);
20-
System.out.printf("Started a new chaining model workflow with instance ID: %s%n", instanceId);
21-
DaprProtos.ConversationResponse response = instanceId.block();
22-
23-
System.out.println(response.getOutputsCount());
2421

22+
// Component name is the name provided in the metadata block of the conversation.yaml file.
23+
Mono<DaprConversationResponse> instanceId = client.converse("openai", new ArrayList<>(Collections.singleton(daprConversationInput)), "1234", false, 0.0d);
24+
System.out.printf("Started a new chaining model workflow with instance ID: %s%n", instanceId);
25+
DaprConversationResponse response = instanceId.block();
2526

27+
System.out.println(response);
2628
} catch (Exception e) {
2729
throw new RuntimeException(e);
2830
}

sdk-ai/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<parent>
88
<groupId>io.dapr</groupId>
99
<artifactId>dapr-sdk-parent</artifactId>
10-
<version>1.14.0-SNAPSHOT</version>
10+
<version>1.15.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>dapr-sdk-ai</artifactId>
1414
<packaging>jar</packaging>
15-
<version>1.14.0-SNAPSHOT</version>
15+
<version>1.15.0-SNAPSHOT</version>
1616
<name>dapr-sdk-ai</name>
1717
<description>SDK for AI on Dapr</description>
1818

0 commit comments

Comments
 (0)