microsoft / microsoft/semantic-kernel-java

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

Open
#120 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug java triage
Dominant language
Java
Stars
276
Forks
56
Avg merge
17h 45m
Merged PRs (30d)
4

Description

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>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the pom.xml dependencies and reproduce the compilation error from the Java snippet. Compare the semantickernel-api 1.1.5 dependency with semantickernel-core 0.2.13-alpha and the DefaultSemanticTextMemory constructor that refers to MemoryStore. Done means the sample compiles without the missing-type error using a consistent dependency setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.