|
7 | 7 |
|
8 | 8 | package org.elasticsearch.xpack.inference.services.amazonbedrock;
|
9 | 9 |
|
10 |
| -import org.elasticsearch.inference.UnifiedCompletionRequest; |
11 |
| -import org.elasticsearch.test.http.MockResponse; |
12 |
| - |
13 |
| -import org.elasticsearch.test.http.MockWebServer; |
14 |
| -import org.elasticsearch.xpack.core.inference.results.UnifiedChatCompletionException; |
15 |
| -import org.elasticsearch.xpack.inference.external.http.HttpClientManager; |
16 |
| -import org.elasticsearch.xpack.inference.external.http.sender.HttpRequestSenderTests; |
17 |
| -import org.elasticsearch.xpack.inference.logging.ThrottlerManager; |
18 |
| -import org.elasticsearch.xpack.inference.services.InferenceEventsAssertion; |
19 |
| - |
20 |
| -import org.elasticsearch.xpack.inference.services.amazonbedrock.client.AmazonBedrockRequestSenderTests; |
21 |
| - |
22 | 10 | import software.amazon.awssdk.services.bedrockruntime.model.BedrockRuntimeException;
|
23 | 11 |
|
24 | 12 | import org.elasticsearch.ElasticsearchException;
|
|
44 | 32 | import org.elasticsearch.inference.ModelSecrets;
|
45 | 33 | import org.elasticsearch.inference.SimilarityMeasure;
|
46 | 34 | import org.elasticsearch.inference.TaskType;
|
| 35 | +import org.elasticsearch.inference.UnifiedCompletionRequest; |
| 36 | +import org.elasticsearch.test.ESTestCase; |
| 37 | +import org.elasticsearch.test.http.MockResponse; |
| 38 | +import org.elasticsearch.test.http.MockWebServer; |
47 | 39 | import org.elasticsearch.threadpool.ThreadPool;
|
48 | 40 | import org.elasticsearch.xcontent.ToXContent;
|
49 | 41 | import org.elasticsearch.xcontent.XContentType;
|
|
53 | 45 | import org.elasticsearch.xpack.core.inference.results.TextEmbeddingFloatResults;
|
54 | 46 | import org.elasticsearch.xpack.inference.Utils;
|
55 | 47 | import org.elasticsearch.xpack.inference.common.amazon.AwsSecretSettings;
|
| 48 | +import org.elasticsearch.xpack.inference.external.http.HttpClientManager; |
56 | 49 | import org.elasticsearch.xpack.inference.external.http.sender.HttpRequestSender;
|
57 | 50 | import org.elasticsearch.xpack.inference.external.http.sender.Sender;
|
58 | 51 | import org.elasticsearch.xpack.inference.services.InferenceServiceTestCase;
|
| 52 | +import org.elasticsearch.xpack.inference.logging.ThrottlerManager; |
| 53 | +import org.elasticsearch.xpack.inference.services.InferenceEventsAssertion; |
59 | 54 | import org.elasticsearch.xpack.inference.services.ServiceComponentsTests;
|
60 | 55 | import org.elasticsearch.xpack.inference.services.amazonbedrock.client.AmazonBedrockMockRequestSender;
|
| 56 | +import org.elasticsearch.xpack.inference.services.amazonbedrock.client.AmazonBedrockRequestSenderTests; |
61 | 57 | import org.elasticsearch.xpack.inference.services.amazonbedrock.completion.AmazonBedrockChatCompletionModel;
|
62 | 58 | import org.elasticsearch.xpack.inference.services.amazonbedrock.completion.AmazonBedrockChatCompletionModelTests;
|
63 | 59 | import org.elasticsearch.xpack.inference.services.amazonbedrock.completion.AmazonBedrockChatCompletionServiceSettings;
|
|
93 | 89 | import static org.elasticsearch.xpack.inference.chunking.ChunkingSettingsTests.createRandomChunkingSettings;
|
94 | 90 | import static org.elasticsearch.xpack.inference.chunking.ChunkingSettingsTests.createRandomChunkingSettingsMap;
|
95 | 91 | import static org.elasticsearch.xpack.inference.common.amazon.AwsSecretSettingsTests.getAmazonBedrockSecretSettingsMap;
|
96 |
| -import static org.elasticsearch.xpack.inference.external.http.Utils.getUrl; |
97 | 92 | import static org.elasticsearch.xpack.inference.services.ServiceComponentsTests.createWithEmptySettings;
|
98 | 93 | import static org.elasticsearch.xpack.inference.services.amazonbedrock.AmazonBedrockProviderCapabilities.getProviderDefaultSimilarityMeasure;
|
99 |
| -import static org.elasticsearch.xpack.inference.services.amazonbedrock.completion.AmazonBedrockChatCompletionModelTests.createModel; |
100 | 94 | import static org.elasticsearch.xpack.inference.services.amazonbedrock.completion.AmazonBedrockChatCompletionServiceSettingsTests.createChatCompletionRequestSettingsMap;
|
101 | 95 | import static org.elasticsearch.xpack.inference.services.amazonbedrock.completion.AmazonBedrockChatCompletionTaskSettingsTests.getChatCompletionTaskSettingsMap;
|
102 | 96 | import static org.elasticsearch.xpack.inference.services.amazonbedrock.embeddings.AmazonBedrockEmbeddingsServiceSettingsTests.createEmbeddingsRequestSettingsMap;
|
103 | 97 | import static org.hamcrest.CoreMatchers.is;
|
104 | 98 | import static org.hamcrest.Matchers.containsString;
|
105 |
| -import static org.hamcrest.Matchers.equalTo; |
106 | 99 | import static org.hamcrest.Matchers.hasSize;
|
107 | 100 | import static org.hamcrest.Matchers.instanceOf;
|
108 |
| -import static org.hamcrest.Matchers.isA; |
109 | 101 | import static org.mockito.Mockito.mock;
|
110 | 102 | import static org.mockito.Mockito.times;
|
111 | 103 | import static org.mockito.Mockito.verify;
|
|
0 commit comments