All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.honhimw.ms.api.reactive.ReactiveEmbeddersSettings Maven / Gradle / Ivy

/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.github.honhimw.ms.api.reactive;

import io.github.honhimw.ms.Experimental;
import io.github.honhimw.ms.model.Embedder;
import io.github.honhimw.ms.model.Pagination;
import io.github.honhimw.ms.model.TaskInfo;
import io.github.honhimw.ms.support.MapBuilder;
import io.swagger.v3.oas.annotations.Operation;
import reactor.core.publisher.Mono;

import java.util.Map;
import java.util.function.Consumer;

/**
 * 

Deactivate vector search

* * @author hon_him * @see Pagination * @since 2024-01-18 V1.6 */ @Experimental(features = Experimental.Features.VECTOR_SEARCH) public interface ReactiveEmbeddersSettings { /** * Get current embedders configuration from your index: * * @return */ @Operation(method = "GET", tags = "/indexes/{index_uid}/settings/embedders") Mono> get(); /** * Update all embedder configuration from your index: * * @return update task */ @Operation(method = "PATCH", tags = "/indexes/{index_uid}/settings/embedders") Mono update(Map embedders); @Operation(method = "PATCH", tags = "/indexes/{index_uid}/settings/embedders") default Mono update(Consumer> embedders) { MapBuilder builder = MapBuilder.builder(); embedders.accept(builder); return update(builder.build()); } /** * Manually remove all embedder configuration from your index: *

WARNING

*
     * If you don't remove all embedders, Meilisearch will continue auto-generating embeddings for you documents. This will happen even if vectorStore has been set to false and may lead to unexpected expenses when using OpenAI's paid tiers.
     * 
* * @return reset task */ @Operation(method = "DELETE", tags = "/indexes/{index_uid}/settings/embedders") Mono reset(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy