Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: Bug: The constructor DefaultSemanticTextMemory(MemoryStore, EmbeddingGeneration<String>) refers to the missing type MemoryStore #120

Open
normalian opened this issue Jul 16, 2024 · 2 comments
Labels
bug Something isn't working java Pull requests that update Java code triage Needs triage from engineering team

Comments

@normalian
Copy link

Describe the bug
I have tried to use AzureAISearch for vector DB, but there is no MemoryStore class across jar files. I believe semantickernel-core-0.2.6-alpha.jar should contain MemoryStore class, but there is no such file.

To Reproduce
Steps to reproduce the behavior:

  1. configure pom.xml with following dependencies
  2. create following Java code

Expected behavior
Solve missing type MemoryStore error.

Platform

  • OS: Windows
  • IDE: VS Code
  • Language: Java
  • Source: maven and following Java code
        OpenAIAsyncClient client = new OpenAIClientBuilder()
                .endpoint(endpoint)
                .credential(new AzureKeyCredential(secretKey))
                .buildAsyncClient();
        OpenAITextEmbeddingGeneration embedding = new OpenAITextEmbeddingGeneration(client, "text-embedding-ada-002");
        DefaultSemanticTextMemory memory = new DefaultSemanticTextMemory(aisearchMemory, embedding);

Additional context
Here is pom.xml dependencies.

  <dependencies>
    <dependency>
      <groupId>com.microsoft.semantic-kernel</groupId>
      <artifactId>semantickernel-api</artifactId>
      <version>1.1.5</version>
    </dependency>
    <!--
    https://mvnrepository.com/artifact/com.microsoft.semantic-kernel/semantickernel-aiservices-openai -->
    <dependency>
      <groupId>com.microsoft.semantic-kernel</groupId>
      <artifactId>semantickernel-aiservices-openai</artifactId>
      <version>1.1.5</version>
    </dependency>
    <dependency>
      <groupId>com.microsoft.semantic-kernel</groupId>
      <artifactId>semantickernel-core</artifactId>
      <version>0.2.13-alpha</version>
      <scope>runtime</scope>
      <!-- TODO: scope should be runtime, but VolatileMemoryStore is an issue -->
      <!-- <scope>runtime</scope> -->
    </dependency>
    <dependency>
      <groupId>com.microsoft.semantic-kernel</groupId>
      <artifactId>semantickernel-plugin-core</artifactId>
      <version>0.2.13-alpha</version>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-ai-openai</artifactId>
      <version>1.0.0-beta.8</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.20.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.20.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j2-impl</artifactId>
      <version>2.20.0</version>
    </dependency>
    <dependency>
      <groupId>com.microsoft.semantic-kernel</groupId>
      <artifactId>semantickernel-planners</artifactId>
      <version>0.2.13-alpha</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.microsoft.semantic-kernel</groupId>
      <artifactId>semantickernel-gpt3-tokenizer</artifactId>
      <version>0.2.13-alpha</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.17.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.17.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.microsoft.semantic-kernel.connectors</groupId>
      <artifactId>semantickernel-connectors</artifactId>
      <version>0.2.7-alpha</version>
    </dependency>
    <dependency>
      <groupId>redis.clients</groupId>
      <artifactId>jedis</artifactId>
      <version>5.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
@normalian normalian added the bug Something isn't working label Jul 16, 2024
@markwallace-microsoft markwallace-microsoft added java Pull requests that update Java code triage Needs triage from engineering team labels Jul 16, 2024
@github-actions github-actions bot changed the title Bug: The constructor DefaultSemanticTextMemory(MemoryStore, EmbeddingGeneration<String>) refers to the missing type MemoryStore Java: Bug: The constructor DefaultSemanticTextMemory(MemoryStore, EmbeddingGeneration<String>) refers to the missing type MemoryStore Jul 16, 2024
@normalian
Copy link
Author

@johnoliver johnoliver transferred this issue from microsoft/semantic-kernel Jul 26, 2024
@johnoliver
Copy link
Member

@normalian Hi, so we have had a fair amount of change in the memory area, are you able to test if the latest updates work for you. You can see examples of using datastores at:

https://github.com/microsoft/semantic-kernel-java/tree/main/samples/semantickernel-concepts/semantickernel-syntax-examples/src/main/java/com/microsoft/semantickernel/samples/syntaxexamples/memory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working java Pull requests that update Java code triage Needs triage from engineering team
Projects
None yet
Development

No branches or pull requests

3 participants