Skip to content

Commit 8d507c5

Browse files
committed
upgrade semantic kernel version to 1.4.3. function calls telemetry added to app insights
1 parent b5f9ed1 commit 8d507c5

File tree

6 files changed

+13
-253
lines changed

6 files changed

+13
-253
lines changed

app/copilot/copilot-backend/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<properties>
1818
<java.version>17</java.version>
1919

20-
<spring-cloud-azure.version>5.14.0</spring-cloud-azure.version>
21-
<semantic-kernel.version>1.2.2</semantic-kernel.version>
20+
<spring-cloud-azure.version>5.20.0</spring-cloud-azure.version>
21+
<semantic-kernel.version>1.4.3</semantic-kernel.version>
2222
<mockito-inline.version>4.5.1</mockito-inline.version>
2323
<maven.compiler-plugin.version>3.11.0</maven.compiler-plugin.version>
2424

@@ -125,7 +125,7 @@
125125
<dependency>
126126
<groupId>com.microsoft.openai.samples.assistant</groupId>
127127
<artifactId>semantickernel-openapi-plugin</artifactId>
128-
<version>1.1.5-SNAPSHOT</version>
128+
<version>1.4.3</version>
129129
</dependency>
130130

131131
</dependencies>

app/copilot/copilot-backend/src/main/java/com/microsoft/openai/samples/assistant/agent/PaymentAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public PaymentAgent(OpenAIAsyncClient client, LoggedUserService loggedUserServic
9393
//Used to retrieve transactions.
9494
KernelPlugin openAPIImporterTransactionPlugin = SemanticKernelOpenAPIImporter
9595
.builder()
96-
.withPluginName("TransactionHistoryMockPlugin")
96+
.withPluginName("TransactionHistoryPlugin")
9797
.withSchema(transactionsAPIYaml)
9898
.withServer(transactionAPIUrl)
9999
.build();

app/copilot/copilot-backend/src/main/java/com/microsoft/openai/samples/assistant/common/ChatGPTUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public static ChatCompletionsOptions buildDefaultChatCompletionsOptions(List<Cha
1919
//completionsOptions.setStop(new ArrayList<>(List.of("\n")));
2020
completionsOptions.setLogitBias(new HashMap<>());
2121
completionsOptions.setN(1);
22-
completionsOptions.setStream(false);
2322
completionsOptions.setUser("search-openai-demo-java");
2423
completionsOptions.setPresencePenalty(0.0);
2524
completionsOptions.setFrequencyPenalty(0.0);
@@ -40,10 +39,10 @@ public static String formatAsChatML(List<ChatRequestMessage> messages) {
4039
content = ((ChatRequestUserMessage) message).getContent().toString();
4140
} else if (message instanceof ChatRequestSystemMessage) {
4241
sb.append(IM_START_SYSTEM).append("\n");
43-
content = ((ChatRequestSystemMessage) message).getContent();
42+
content = ((ChatRequestSystemMessage) message).getContent().toString();
4443
} else if (message instanceof ChatRequestAssistantMessage) {
4544
sb.append(IM_START_ASSISTANT).append("\n");
46-
content = ((ChatRequestAssistantMessage) message).getContent();
45+
content = ((ChatRequestAssistantMessage) message).getContent().toString();
4746
}
4847

4948
if (content != null) {

app/copilot/semantickernel-openapi-plugin/pom.xml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
<artifactId>semantickernel-openapi-plugin</artifactId>
1212
<name>semantickernel-openapi-plugin</name>
13-
<version>1.1.5-SNAPSHOT</version>
13+
<version>1.4.3</version>
1414
<packaging>jar</packaging>
1515

1616
<properties>
1717
<java.version>17</java.version>
18-
<semantic-kernel.version>1.1.5</semantic-kernel.version>
18+
<semantic-kernel.version>1.4.3</semantic-kernel.version>
1919
</properties>
2020

2121
<dependencyManagement>
@@ -82,18 +82,8 @@
8282
<artifactId>semantickernel-aiservices-openai</artifactId>
8383
</dependency>
8484
<dependency>
85-
<groupId>org.apache.logging.log4j</groupId>
86-
<artifactId>log4j-api</artifactId>
87-
<scope>test</scope>
88-
</dependency>
89-
<dependency>
90-
<groupId>org.apache.logging.log4j</groupId>
91-
<artifactId>log4j-core</artifactId>
92-
<scope>test</scope>
93-
</dependency>
94-
<dependency>
95-
<groupId>org.apache.logging.log4j</groupId>
96-
<artifactId>log4j-slf4j2-impl</artifactId>
85+
<groupId>org.junit.jupiter</groupId>
86+
<artifactId>junit-jupiter-api</artifactId>
9787
<scope>test</scope>
9888
</dependency>
9989
</dependencies>
@@ -149,4 +139,4 @@
149139
</plugin>
150140
</plugins>
151141
</build>
152-
</project>
142+
</project>

app/copilot/semantickernel-openapi-plugin/src/test/java/ExampleOpenAPIParent.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import com.azure.core.credential.KeyCredential;
66
import com.microsoft.semantickernel.Kernel;
77
import com.microsoft.semantickernel.Kernel.Builder;
8+
import com.microsoft.semantickernel.aiservices.openai.chatcompletion.OpenAIChatCompletion;
89
import com.microsoft.semantickernel.services.chatcompletion.ChatCompletionService;
910

1011
public class ExampleOpenAPIParent {
@@ -35,7 +36,7 @@ public static Builder kernelBuilder() {
3536
.buildAsyncClient();
3637
}
3738

38-
ChatCompletionService openAIChatCompletion = ChatCompletionService.builder()
39+
ChatCompletionService openAIChatCompletion = OpenAIChatCompletion.builder()
3940
.withOpenAIAsyncClient(client)
4041
.withModelId(MODEL_ID)
4142
.build();

workspace.xml

Lines changed: 0 additions & 230 deletions
This file was deleted.

0 commit comments

Comments
 (0)