Deprecated withApiKey() static factories
This commit is contained in:
parent
8c625c3caf
commit
62794e13e9
|
@ -134,7 +134,7 @@ public class AnthropicChatModel implements ChatLanguageModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static AnthropicChatModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -136,7 +136,7 @@ public class AnthropicStreamingChatModel implements StreamingChatLanguageModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static AnthropicStreamingChatModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -54,11 +54,11 @@ public class CohereEmbeddingModel extends DimensionAwareEmbeddingModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static CohereEmbeddingModel withApiKey(String apiKey) {
|
||||
return CohereEmbeddingModel.builder().apiKey(apiKey).build();
|
||||
return builder().apiKey(apiKey).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,7 +69,6 @@ public class CohereEmbeddingModel extends DimensionAwareEmbeddingModel {
|
|||
.collect(toList());
|
||||
|
||||
return embedTexts(texts);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -89,14 +88,14 @@ public class CohereEmbeddingModel extends DimensionAwareEmbeddingModel {
|
|||
.build();
|
||||
|
||||
EmbedResponse response = this.client.embed(request);
|
||||
|
||||
|
||||
embeddings.addAll(getEmbeddings(response));
|
||||
totalTokenUsage += getTokenUsage(response);
|
||||
}
|
||||
|
||||
return Response.from(
|
||||
embeddings,
|
||||
new TokenUsage(totalTokenUsage,0)
|
||||
new TokenUsage(totalTokenUsage, 0)
|
||||
);
|
||||
|
||||
}
|
||||
|
|
|
@ -53,11 +53,11 @@ public class CohereScoringModel implements ScoringModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static CohereScoringModel withApiKey(String apiKey) {
|
||||
return CohereScoringModel.builder().apiKey(apiKey).build();
|
||||
return builder().apiKey(apiKey).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -52,7 +52,7 @@ public class JinaEmbeddingModel extends DimensionAwareEmbeddingModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static JinaEmbeddingModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -52,7 +52,7 @@ public class JinaScoringModel implements ScoringModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static JinaScoringModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -96,7 +96,7 @@ public class MistralAiChatModel implements ChatLanguageModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static MistralAiChatModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -63,7 +63,7 @@ public class MistralAiEmbeddingModel extends DimensionAwareEmbeddingModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static MistralAiEmbeddingModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -51,7 +51,7 @@ public class MistralAiModels {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static MistralAiModels withApiKey(String apiKey) {
|
||||
|
|
|
@ -87,7 +87,7 @@ public class MistralAiStreamingChatModel implements StreamingChatLanguageModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static MistralAiStreamingChatModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -53,7 +53,7 @@ public class NomicEmbeddingModel extends DimensionAwareEmbeddingModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static NomicEmbeddingModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -308,7 +308,7 @@ public class OpenAiChatModel implements ChatLanguageModel, TokenCountEstimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OpenAiChatModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -130,7 +130,7 @@ public class OpenAiEmbeddingModel extends DimensionAwareEmbeddingModel implement
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OpenAiEmbeddingModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -165,7 +165,7 @@ public class OpenAiImageModel implements ImageModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OpenAiImageModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -100,7 +100,7 @@ public class OpenAiLanguageModel implements LanguageModel, TokenCountEstimator {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OpenAiLanguageModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -111,7 +111,7 @@ public class OpenAiModerationModel implements ModerationModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OpenAiModerationModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -290,7 +290,7 @@ public class OpenAiStreamingChatModel implements StreamingChatLanguageModel, Tok
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OpenAiStreamingChatModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -119,7 +119,7 @@ public class OpenAiStreamingLanguageModel implements StreamingLanguageModel, Tok
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the model name and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OpenAiStreamingLanguageModel withApiKey(String apiKey) {
|
||||
|
|
|
@ -58,7 +58,7 @@ public class OvhAiEmbeddingModel implements EmbeddingModel {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #builder()} instead and explicitly set the base URL and, if required, other parameters.
|
||||
* @deprecated use {@code builder()} instead and explicitly set the base URL and, if required, other parameters.
|
||||
*/
|
||||
@Deprecated
|
||||
public static OvhAiEmbeddingModel withApiKey(String apiKey) {
|
||||
|
|
Loading…
Reference in New Issue