Skip to content

Commit e9b5f67

Browse files
committed
Merge branch 'sk-vector-stores'
2 parents efa673a + db4da61 commit e9b5f67

File tree

17 files changed

+646
-552
lines changed

17 files changed

+646
-552
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

app/backend/pom.xml

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

1919
<spring-cloud-azure.version>5.14.0</spring-cloud-azure.version>
20-
<azure-search.version>11.6.0-beta.8</azure-search.version>
21-
<semantic-kernel.version>1.2.2</semantic-kernel.version>
20+
<azure-search.version>11.7.2</azure-search.version>
21+
<semantic-kernel.version>1.4.2</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

@@ -123,6 +123,10 @@
123123
<groupId>com.microsoft.semantic-kernel</groupId>
124124
<artifactId>semantickernel-aiservices-openai</artifactId>
125125
</dependency>
126+
<dependency>
127+
<groupId>com.microsoft.semantic-kernel</groupId>
128+
<artifactId>semantickernel-data-azureaisearch</artifactId>
129+
</dependency>
126130
<!-- Semantic Kernel end -->
127131
</dependencies>
128132

app/backend/src/main/java/com/microsoft/openai/samples/rag/approaches/RAGApproachFactorySpringBootImpl.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
import com.microsoft.openai.samples.rag.ask.approaches.PlainJavaAskApproach;
44
import com.microsoft.openai.samples.rag.ask.approaches.semantickernel.JavaSemanticKernelChainsApproach;
5+
import com.microsoft.openai.samples.rag.ask.approaches.semantickernel.JavaSemanticKernelWithVectorStoreApproach;
56
import com.microsoft.openai.samples.rag.chat.approaches.PlainJavaChatApproach;
67
import com.microsoft.openai.samples.rag.chat.approaches.semantickernel.JavaSemanticKernelChainsChatApproach;
8+
import com.microsoft.openai.samples.rag.chat.approaches.semantickernel.JavaSemanticKernelWithVectorStoreChatApproach;
79
import org.springframework.context.ApplicationContext;
810
import org.springframework.context.ApplicationContextAware;
911
import org.springframework.stereotype.Component;
@@ -13,7 +15,6 @@ public class RAGApproachFactorySpringBootImpl implements RAGApproachFactory, App
1315

1416
private static final String JAVA_OPENAI_SDK = "jos";
1517
private static final String JAVA_SEMANTIC_KERNEL = "jsk";
16-
1718
private static final String JAVA_SEMANTIC_KERNEL_PLANNER = "jskp";
1819
private ApplicationContext applicationContext;
1920

@@ -29,6 +30,8 @@ public RAGApproach createApproach(String approachName, RAGType ragType, RAGOptio
2930
if (ragType.equals(RAGType.CHAT)) {
3031
if (JAVA_OPENAI_SDK.equals(approachName)) {
3132
return applicationContext.getBean(PlainJavaChatApproach.class);
33+
} else if (JAVA_SEMANTIC_KERNEL.equals(approachName)) {
34+
return applicationContext.getBean(JavaSemanticKernelWithVectorStoreChatApproach.class);
3235
} else if (
3336
JAVA_SEMANTIC_KERNEL_PLANNER.equals(approachName) &&
3437
ragOptions != null &&
@@ -39,6 +42,8 @@ public RAGApproach createApproach(String approachName, RAGType ragType, RAGOptio
3942
} else if (ragType.equals(RAGType.ASK)) {
4043
if (JAVA_OPENAI_SDK.equals(approachName))
4144
return applicationContext.getBean(PlainJavaAskApproach.class);
45+
else if (JAVA_SEMANTIC_KERNEL.equals(approachName))
46+
return applicationContext.getBean(JavaSemanticKernelWithVectorStoreApproach.class);
4247
else if (JAVA_SEMANTIC_KERNEL_PLANNER.equals(approachName) && ragOptions != null && ragOptions.getSemantickKernelMode() != null && ragOptions.getSemantickKernelMode() == SemanticKernelMode.chains)
4348
return applicationContext.getBean(JavaSemanticKernelChainsApproach.class);
4449
}

app/backend/src/main/java/com/microsoft/openai/samples/rag/ask/approaches/semantickernel/JavaSemanticKernelWithMemoryApproach.java.ignore

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

0 commit comments

Comments
 (0)