Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
weizijun committed Jan 9, 2025
1 parent 06470b1 commit 16b65b5
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
package org.elasticsearch.xpack.inference.services.alibabacloudsearch.completion;

import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.inference.SimilarityMeasure;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.inference.services.ServiceFields;
import org.elasticsearch.xpack.inference.services.alibabacloudsearch.AlibabaCloudSearchServiceSettings;
import org.elasticsearch.xpack.inference.services.alibabacloudsearch.AlibabaCloudSearchServiceSettingsTests;
import org.hamcrest.MatcherAssert;
Expand All @@ -29,25 +27,13 @@ public static AlibabaCloudSearchCompletionServiceSettings createRandom() {
}

public void testFromMap() {
var url = "https://www.abc.com";
var similarity = SimilarityMeasure.DOT_PRODUCT.toString();
var dims = 1536;
var maxInputTokens = 512;
var model = "model";
var host = "host";
var workspaceName = "default";
var httpSchema = "https";
var serviceSettings = AlibabaCloudSearchCompletionServiceSettings.fromMap(
new HashMap<>(
Map.of(
ServiceFields.URL,
url,
ServiceFields.SIMILARITY,
similarity,
ServiceFields.DIMENSIONS,
dims,
ServiceFields.MAX_INPUT_TOKENS,
maxInputTokens,
AlibabaCloudSearchServiceSettings.HOST,
host,
AlibabaCloudSearchServiceSettings.SERVICE_ID,
Expand Down

0 comments on commit 16b65b5

Please sign in to comment.