Skip to content

Commit

Permalink
REVERT - debug commit
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Dec 6, 2023
1 parent dd428ca commit 08bd54d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ jobs:
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Build with Maven
run: mvn -B clean install -Dno-format
env: # note that secrets are not available when triggered by PR from a fork, so some tests will be skipped
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}
PINECONE_INDEX_NAME: ${{ secrets.PINECONE_INDEX_NAME }}
PINECONE_PROJECT_ID: ${{ secrets.PINECONE_PROJECT_ID }}
# - name: Build with Maven
# run: mvn -B clean install -Dno-format
# env: # note that secrets are not available when triggered by PR from a fork, so some tests will be skipped
# PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
# PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}
# PINECONE_INDEX_NAME: ${{ secrets.PINECONE_INDEX_NAME }}
# PINECONE_PROJECT_ID: ${{ secrets.PINECONE_PROJECT_ID }}

- name: Build with Maven (Native)
run: mvn -B install -Dnative -Dquarkus.native.container-build -Dnative.surefire.skip
env: # note that secrets are not available when triggered by PR from a fork, so some tests will be skipped
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}
PINECONE_INDEX_NAME: ${{ secrets.PINECONE_INDEX_NAME }}
PINECONE_PROJECT_ID: ${{ secrets.PINECONE_PROJECT_ID }}
# env: # note that secrets are not available when triggered by PR from a fork, so some tests will be skipped
# PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
# PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}
# PINECONE_INDEX_NAME: ${{ secrets.PINECONE_INDEX_NAME }}
# PINECONE_PROJECT_ID: ${{ secrets.PINECONE_PROJECT_ID }}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static dev.langchain4j.exception.IllegalConfigurationException.illegalConfiguration;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -127,8 +128,11 @@ public T build() {
}

try {
return (T) Class.forName(classCreateInfo.getImplClassName(), true, Thread.currentThread()
.getContextClassLoader()).getConstructor(QuarkusAiServiceContext.class)
System.out.println(context.getClass().getName());
Class<?> implClass = Class.forName(classCreateInfo.getImplClassName(), true, Thread.currentThread()
.getContextClassLoader());
System.out.println(Arrays.toString(implClass.getConstructors()));
return (T) implClass.getConstructor(QuarkusAiServiceContext.class)
.newInstance(((QuarkusAiServiceContext) context));
} catch (Exception e) {
throw new IllegalStateException("Unable to create class '" + classCreateInfo.getImplClassName(), e);
Expand Down

0 comments on commit 08bd54d

Please sign in to comment.