slight refactoring
This commit is contained in:
parent
b29d31029f
commit
8e8b7a526d
|
@ -16,7 +16,7 @@ import java.util.Base64;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.params.provider.EnumSource.Mode.EXCLUDE;
|
||||
|
||||
@Disabled("expensive to run very often")
|
||||
@Disabled("Run manually before release. Expensive to run very often.")
|
||||
public class AzureOpenAiImageModelIT {
|
||||
|
||||
@Test
|
||||
|
|
|
@ -15,7 +15,7 @@ import static dev.ai4j.openai4j.image.ImageModel.*;
|
|||
import static dev.langchain4j.model.openai.OpenAiImageModelName.DALL_E_2;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@Disabled("expensive to run very often")
|
||||
@Disabled("Run manually before release. Expensive to run very often.")
|
||||
class OpenAiImageModelIT {
|
||||
|
||||
Logger log = LoggerFactory.getLogger(OpenAiImageModelIT.class);
|
||||
|
|
|
@ -13,15 +13,18 @@ import org.junit.jupiter.api.Disabled;
|
|||
|
||||
import static dev.langchain4j.internal.Utils.randomUUID;
|
||||
|
||||
@Disabled("Free sandbox expires every 14 days. Run manually before release.")
|
||||
@Disabled("Run manually before release. Free sandbox expires every 14 days.")
|
||||
class CloudWeaviateEmbeddingStoreIT extends EmbeddingStoreIT {
|
||||
|
||||
private static final String WEAVIATE_API_KEY = "";
|
||||
private static final String WEAVIATE_HOST = "";
|
||||
|
||||
String objectClass = "Test" + randomUUID().replace("-", "");
|
||||
|
||||
EmbeddingStore<TextSegment> embeddingStore = WeaviateEmbeddingStore.builder()
|
||||
.apiKey(System.getenv("WEAVIATE_API_KEY"))
|
||||
.apiKey(WEAVIATE_API_KEY)
|
||||
.scheme("https")
|
||||
.host(System.getenv("WEAVIATE_HOST"))
|
||||
.host(WEAVIATE_HOST)
|
||||
.objectClass(objectClass)
|
||||
.metadataKeys(LocalWeaviateEmbeddingStoreIT.METADATA_KEYS)
|
||||
.build();
|
||||
|
@ -41,7 +44,7 @@ class CloudWeaviateEmbeddingStoreIT extends EmbeddingStoreIT {
|
|||
@Override
|
||||
protected void clearStore() {
|
||||
try {
|
||||
WeaviateClient client = WeaviateAuthClient.apiKey(new Config("https", System.getenv("WEAVIATE_HOST")), System.getenv("WEAVIATE_API_KEY"));
|
||||
WeaviateClient client = WeaviateAuthClient.apiKey(new Config("https", WEAVIATE_HOST), WEAVIATE_API_KEY);
|
||||
client.batch().objectsBatchDeleter()
|
||||
.withClassName(objectClass)
|
||||
.run();
|
||||
|
@ -52,6 +55,6 @@ class CloudWeaviateEmbeddingStoreIT extends EmbeddingStoreIT {
|
|||
|
||||
@Override
|
||||
protected void ensureStoreIsEmpty() {
|
||||
|
||||
// TODO fix
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue