public abstract class AbstractBedrockEmbeddingModel<T extends BedrockEmbeddingResponse> extends Object implements dev.langchain4j.model.embedding.EmbeddingModel
| Constructor and Description |
|---|
AbstractBedrockEmbeddingModel() |
| Modifier and Type | Method and Description |
|---|---|
dev.langchain4j.model.output.Response<List<dev.langchain4j.data.embedding.Embedding>> |
embedAll(List<dev.langchain4j.data.segment.TextSegment> textSegments) |
protected abstract String |
getModelId()
Get model id
|
protected abstract List<Map<String,Object>> |
getRequestParameters(List<dev.langchain4j.data.segment.TextSegment> textSegments)
Get request body
|
protected abstract Class<T> |
getResponseClassType()
Get response class type
|
protected software.amazon.awssdk.services.bedrockruntime.model.InvokeModelResponse |
invoke(String body)
Invoke model
|
protected static Map<String,Object> |
of(String key,
Object value)
Create map with single entry
|
public dev.langchain4j.model.output.Response<List<dev.langchain4j.data.embedding.Embedding>> embedAll(List<dev.langchain4j.data.segment.TextSegment> textSegments)
embedAll in interface dev.langchain4j.model.embedding.EmbeddingModelprotected abstract List<Map<String,Object>> getRequestParameters(List<dev.langchain4j.data.segment.TextSegment> textSegments)
textSegments - Input texts to convert to embeddingprotected abstract String getModelId()
protected abstract Class<T> getResponseClassType()
protected software.amazon.awssdk.services.bedrockruntime.model.InvokeModelResponse invoke(String body)
body - bodyCopyright © 2024. All rights reserved.