Skip to content

Commit

Permalink
Merge branch 'sk-vector-stores'
Browse files Browse the repository at this point in the history
  • Loading branch information
dantelmomsft committed Jan 30, 2025
2 parents efa673a + db4da61 commit e9b5f67
Show file tree
Hide file tree
Showing 17 changed files with 646 additions and 552 deletions.
16 changes: 8 additions & 8 deletions README.md

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions app/backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<java.version>17</java.version>

<spring-cloud-azure.version>5.14.0</spring-cloud-azure.version>
<azure-search.version>11.6.0-beta.8</azure-search.version>
<semantic-kernel.version>1.2.2</semantic-kernel.version>
<azure-search.version>11.7.2</azure-search.version>
<semantic-kernel.version>1.4.2</semantic-kernel.version>
<mockito-inline.version>4.5.1</mockito-inline.version>
<maven.compiler-plugin.version>3.11.0</maven.compiler-plugin.version>

Expand Down Expand Up @@ -123,6 +123,10 @@
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-aiservices-openai</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.semantic-kernel</groupId>
<artifactId>semantickernel-data-azureaisearch</artifactId>
</dependency>
<!-- Semantic Kernel end -->
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import com.microsoft.openai.samples.rag.ask.approaches.PlainJavaAskApproach;
import com.microsoft.openai.samples.rag.ask.approaches.semantickernel.JavaSemanticKernelChainsApproach;
import com.microsoft.openai.samples.rag.ask.approaches.semantickernel.JavaSemanticKernelWithVectorStoreApproach;
import com.microsoft.openai.samples.rag.chat.approaches.PlainJavaChatApproach;
import com.microsoft.openai.samples.rag.chat.approaches.semantickernel.JavaSemanticKernelChainsChatApproach;
import com.microsoft.openai.samples.rag.chat.approaches.semantickernel.JavaSemanticKernelWithVectorStoreChatApproach;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
Expand All @@ -13,7 +15,6 @@ public class RAGApproachFactorySpringBootImpl implements RAGApproachFactory, App

private static final String JAVA_OPENAI_SDK = "jos";
private static final String JAVA_SEMANTIC_KERNEL = "jsk";

private static final String JAVA_SEMANTIC_KERNEL_PLANNER = "jskp";
private ApplicationContext applicationContext;

Expand All @@ -29,6 +30,8 @@ public RAGApproach createApproach(String approachName, RAGType ragType, RAGOptio
if (ragType.equals(RAGType.CHAT)) {
if (JAVA_OPENAI_SDK.equals(approachName)) {
return applicationContext.getBean(PlainJavaChatApproach.class);
} else if (JAVA_SEMANTIC_KERNEL.equals(approachName)) {
return applicationContext.getBean(JavaSemanticKernelWithVectorStoreChatApproach.class);
} else if (
JAVA_SEMANTIC_KERNEL_PLANNER.equals(approachName) &&
ragOptions != null &&
Expand All @@ -39,6 +42,8 @@ public RAGApproach createApproach(String approachName, RAGType ragType, RAGOptio
} else if (ragType.equals(RAGType.ASK)) {
if (JAVA_OPENAI_SDK.equals(approachName))
return applicationContext.getBean(PlainJavaAskApproach.class);
else if (JAVA_SEMANTIC_KERNEL.equals(approachName))
return applicationContext.getBean(JavaSemanticKernelWithVectorStoreApproach.class);
else if (JAVA_SEMANTIC_KERNEL_PLANNER.equals(approachName) && ragOptions != null && ragOptions.getSemantickKernelMode() != null && ragOptions.getSemantickKernelMode() == SemanticKernelMode.chains)
return applicationContext.getBean(JavaSemanticKernelChainsApproach.class);
}
Expand Down

This file was deleted.

Loading

0 comments on commit e9b5f67

Please sign in to comment.