Deprecated API
Contents
-
ElementDescriptionplease use the new
JsonSchemaElement
API instead to define the schema for tool parametersplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease useJsonArraySchema.builder()
insteadplease useJsonBooleanSchema()
insteadplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease useJsonEnumSchema
insteadplease useJsonEnumSchema
insteadplease useJsonEnumSchema
insteadplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease useJsonIntegerSchema()
insteadplease useJsonArraySchema
insteadplease useJsonNumberSchema()
insteadplease useJsonObjectSchema.builder()
insteadplease useJsonObjectSchema
insteadplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease useJsonStringSchema()
insteadplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease use the newJsonObjectSchema
API instead to define the schema for tool parameters. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useJsonObjectSchema.builder()
insteadplease useJsonObjectSchema.Builder.build()
insteadplease useJsonObjectSchema.Builder.properties(Map)
insteadplease useJsonObjectSchema.Builder.required(List)
insteadplease useJsonObjectSchema.builder()
insteadplease useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.parameters()
insteadPlease use another constructor with a newContentRetriever
instead.Use this instead:.retrievalAugmentor(DefaultRetrievalAugmentor.builder() .contentInjector(DefaultContentInjector.builder() .promptTemplate(promptTemplate) .build()) .build());
as of 0.31.0, useDocument.metadata()
and thenMetadata.getString(String)
,Metadata.getInteger(String)
,Metadata.getLong(String)
,Metadata.getFloat(String)
,Metadata.getDouble(String)
instead.as of 0.31.0, useMetadata.put(String, String)
,Metadata.put(String, int)
,Metadata.put(String, long)
,Metadata.put(String, float)
,Metadata.put(String, double)
instead.as of 0.31.0, useMetadata.put(String, String)
,Metadata.put(String, int)
,Metadata.put(String, long)
,Metadata.put(String, float)
,Metadata.put(String, double)
instead.as of 0.31.0, useMetadata.toMap()
instead.UseMetadata.from(String, String)
insteadas of 0.31.0, useMetadata.getString(String)
,Metadata.getInteger(String)
,Metadata.getLong(String)
,Metadata.getFloat(String)
,Metadata.getDouble(String)
instead.UseMetadata.metadata(String, String)
insteadUse the constructor with suppliers for Tika components if you intend to use this parser for multiple files.UseUserMessage.singleText()
orUserMessage.contents()
instead.as of 0.31.0, useTextSegment.metadata()
and thenMetadata.getString(String)
,Metadata.getInteger(String)
,Metadata.getLong(String)
,Metadata.getFloat(String)
,Metadata.getDouble(String)
instead.UseUtils.isNullOrEmpty(Collection)
instead.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please useAzureOpenAiStreamingChatModel.Builder.openAIAsyncClient(OpenAIAsyncClient)
instead, if you require response streaming. Please useAzureOpenAiChatModel
instead, if you require sync responses.If you want to continue using sync client, useAzureOpenAiChatModel
instead.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!As of release 0.29.0, replaced byMistralAiChatModelName.MISTRAL_MEDIUM_LATEST
As of release 0.29.0, replaced byMistralAiChatModelName.MISTRAL_SMALL_LATEST
As of release 0.29.0, replaced byMistralAiChatModelName.OPEN_MISTRAL_7B
Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!use one of the following enums instead:OpenAiChatModelName
,OpenAiEmbeddingModelName
OpenAiImageModelName
,OpenAiLanguageModelName
,OpenAiModerationModelName
Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!Please use other constructors and specify the model name explicitly.Please usebuilder()
instead, and explicitly set the baseUrl and, if necessary, other parameters. The default value for baseUrl will be removed in future releases!useEmbeddingStoreContentRetriever
instead.Please useContentRetriever
instead.UseAiServices.contentRetriever(ContentRetriever)
(e.g.EmbeddingStoreContentRetriever
) instead.
Configures a retriever that will be invoked on every method call to fetch relevant information related to the current user message from an underlying source (e.g., embedding store). This relevant information is automatically injected into the message sent to the LLM.dev.langchain4j.store.embedding.elasticsearch.ElasticsearchEmbeddingStore.Builder.dimension(Integer) dimension is not used anymore.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.
-
ClassDescriptionplease use the new
JsonSchemaElement
API instead to define the schema for tool parametersplease use the newJsonObjectSchema
API instead to define the schema for tool parameters. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
use one of the following enums instead:OpenAiChatModelName
,OpenAiEmbeddingModelName
OpenAiImageModelName
,OpenAiLanguageModelName
,OpenAiModerationModelName
useEmbeddingStoreContentRetriever
instead.
-
FieldDescriptionplease use
JsonArraySchema.builder()
insteadplease useJsonBooleanSchema()
insteadplease useJsonIntegerSchema()
insteadplease useJsonNumberSchema()
insteadplease useJsonObjectSchema.builder()
insteadplease useJsonStringSchema()
instead
-
MethodDescriptionplease use the new
JsonSchemaElement
API instead to define the schema for tool parametersplease useJsonEnumSchema
insteadplease useJsonEnumSchema
insteadplease useJsonEnumSchema
insteadplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease useJsonArraySchema
insteadplease useJsonObjectSchema
insteadplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease use the newJsonSchemaElement
API instead to define the schema for tool parametersplease useJsonObjectSchema.builder()
insteadplease useJsonObjectSchema.Builder.build()
insteadplease useJsonObjectSchema.Builder.properties(Map)
insteadplease useJsonObjectSchema.Builder.required(List)
insteadplease useJsonObjectSchema.builder()
insteadplease useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.Builder.parameters(JsonObjectSchema)
instead. Example:ToolSpecification.builder() .name("weather") .description("Returns the current weather in the specified city") .parameters(JsonObjectSchema.builder() .addStringProperty("city", "The name of the city, e.g., Munich") .addEnumProperty("units", List.of("CELSIUS", "FAHRENHEIT")) .required("city") // please specify mandatory properties explicitly .build()) .build();
please useToolSpecification.parameters()
insteadUse this instead:.retrievalAugmentor(DefaultRetrievalAugmentor.builder() .contentInjector(DefaultContentInjector.builder() .promptTemplate(promptTemplate) .build()) .build());
as of 0.31.0, useDocument.metadata()
and thenMetadata.getString(String)
,Metadata.getInteger(String)
,Metadata.getLong(String)
,Metadata.getFloat(String)
,Metadata.getDouble(String)
instead.as of 0.31.0, useMetadata.put(String, String)
,Metadata.put(String, int)
,Metadata.put(String, long)
,Metadata.put(String, float)
,Metadata.put(String, double)
instead.as of 0.31.0, useMetadata.put(String, String)
,Metadata.put(String, int)
,Metadata.put(String, long)
,Metadata.put(String, float)
,Metadata.put(String, double)
instead.as of 0.31.0, useMetadata.toMap()
instead.UseMetadata.from(String, String)
insteadas of 0.31.0, useMetadata.getString(String)
,Metadata.getInteger(String)
,Metadata.getLong(String)
,Metadata.getFloat(String)
,Metadata.getDouble(String)
instead.UseMetadata.metadata(String, String)
insteadUseUserMessage.singleText()
orUserMessage.contents()
instead.as of 0.31.0, useTextSegment.metadata()
and thenMetadata.getString(String)
,Metadata.getInteger(String)
,Metadata.getLong(String)
,Metadata.getFloat(String)
,Metadata.getDouble(String)
instead.use Jackson's ObjectMapperuse Jackson's ObjectMapperuse Jackson's ObjectMapperuse Jackson's ObjectMapperUseUtils.isNullOrEmpty(Collection)
instead.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please useAzureOpenAiStreamingChatModel.Builder.openAIAsyncClient(OpenAIAsyncClient)
instead, if you require response streaming. Please useAzureOpenAiChatModel
instead, if you require sync responses.If you want to continue using sync client, useAzureOpenAiChatModel
instead.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters.Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Functions are deprecated by OpenAI, useInternalOpenAiHelper.toTools(Collection, boolean)
insteadPlease usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default value for the model name will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!Please usebuilder()
instead, and explicitly set the model name and, if necessary, other parameters. The default values for the model name and temperature will be removed in future releases!Please usebuilder()
instead, and explicitly set the baseUrl and, if necessary, other parameters. The default value for baseUrl will be removed in future releases!Use/implementContentInjector.inject(List, ChatMessage)
instead.dev.langchain4j.rag.content.injector.DefaultContentInjector.createPrompt(UserMessage, List<Content>) implement/overrideDefaultContentInjector.createPrompt(ChatMessage, List)
instead.useDefaultContentInjector.inject(List, ChatMessage)
instead.Use/implementRetrievalAugmentor.augment(AugmentationRequest)
instead.UseAiServices.contentRetriever(ContentRetriever)
(e.g.EmbeddingStoreContentRetriever
) instead.
Configures a retriever that will be invoked on every method call to fetch relevant information related to the current user message from an underlying source (e.g., embedding store). This relevant information is automatically injected into the message sent to the LLM.dev.langchain4j.store.embedding.elasticsearch.ElasticsearchEmbeddingStore.Builder.dimension(Integer) dimension is not used anymore.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.as of 0.31.0, useEmbeddingStore.search(EmbeddingSearchRequest)
instead.
-
ConstructorDescriptionplease use the new
JsonSchemaElement
API instead to define the schema for tool parametersPlease use another constructor with a newContentRetriever
instead.Use the constructor with suppliers for Tika components if you intend to use this parser for multiple files.Please use other constructors and specify the model name explicitly.
-
Enum ConstantDescriptionAs of release 0.29.0, replaced by
MistralAiChatModelName.MISTRAL_MEDIUM_LATEST
As of release 0.29.0, replaced byMistralAiChatModelName.MISTRAL_SMALL_LATEST
As of release 0.29.0, replaced byMistralAiChatModelName.OPEN_MISTRAL_7B