Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.34.0 #40

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Please provide a relevant code snippets to reproduce this bug.
A clear and concise description of what you expected to happen.

**Please complete the following information:**
- LangChain4j version: e.g. 0.33.0
- LangChain4j version: e.g. 0.34.0
- Java version: e.g. 17
- Spring Boot version: e.g. 3.3.1

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-anthropic-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-azure-ai-search-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import dev.langchain4j.data.embedding.Embedding;
import dev.langchain4j.data.segment.TextSegment;
import dev.langchain4j.internal.Utils;
import dev.langchain4j.model.embedding.onnx.allminilml6v2.AllMiniLmL6V2EmbeddingModel;
import dev.langchain4j.model.embedding.EmbeddingModel;
import dev.langchain4j.model.embedding.onnx.allminilml6v2.AllMiniLmL6V2EmbeddingModel;
import dev.langchain4j.rag.content.Content;
import dev.langchain4j.rag.content.retriever.ContentRetriever;
import dev.langchain4j.rag.content.retriever.azure.search.AzureAiSearchContentRetriever;
Expand Down Expand Up @@ -239,7 +239,8 @@ void should_provide_ai_search_embedding_store() {
Embedding relevantEmbedding = embeddingModel.embed("fruit").content();
List<EmbeddingMatch<TextSegment>> relevant = embeddingStore.findRelevant(relevantEmbedding, 3);
assertThat(relevant).hasSize(3);
assertThat(relevant.get(0).embedding()).isNotNull();
// TODO uncomment after https://github.com/langchain4j/langchain4j/issues/1617 is closed
// assertThat(relevant.get(0).embedding()).isNotNull();
assertThat(relevant.get(0).embedded().text()).isIn(content1, content3, content5);
});
}
Expand Down
2 changes: 1 addition & 1 deletion langchain4j-azure-open-ai-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class AutoConfigIT {

@ParameterizedTest(name = "Deployment name: {0}")
@CsvSource({
"gpt-4o-turbo",
"gpt-4"
"gpt-4o-mini",
"gpt-4o"
})
void should_provide_chat_model(String deploymentName) {
contextRunner
Expand Down Expand Up @@ -77,8 +77,8 @@ void should_provide_chat_model_no_azure(String deploymentName) {

@ParameterizedTest(name = "Deployment name: {0}")
@CsvSource({
"gpt-35-turbo",
"gpt-4"
"gpt-4o-mini",
"gpt-4o"
})
void should_provide_streaming_chat_model(String deploymentName) {
contextRunner
Expand Down Expand Up @@ -138,7 +138,7 @@ void should_provide_image_model() {
.withPropertyValues(
"langchain4j.azure-open-ai.image-model.api-key=" + AZURE_OPENAI_KEY,
"langchain4j.azure-open-ai.image-model.endpoint=" + AZURE_OPENAI_ENDPOINT,
"langchain4j.azure-open-ai.image-model.deployment-name=" + "dall-e-3"
"langchain4j.azure-open-ai.image-model.deployment-name=" + "dall-e-3-30"
)
.run(context -> {

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-easy-rag-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-elasticsearch-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-milvus-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-ollama-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-open-ai-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ OpenAiChatModel openAiChatModel(Properties properties) {
.frequencyPenalty(chatModelProperties.getFrequencyPenalty())
.logitBias(chatModelProperties.getLogitBias())
.responseFormat(chatModelProperties.getResponseFormat())
.strictJsonSchema(chatModelProperties.getStrictJsonSchema())
.seed(chatModelProperties.getSeed())
.user(chatModelProperties.getUser())
.strictTools(chatModelProperties.getStrictTools())
.parallelToolCalls(chatModelProperties.getParallelToolCalls())
.timeout(chatModelProperties.getTimeout())
.maxRetries(chatModelProperties.getMaxRetries())
.proxy(ProxyProperties.convert(chatModelProperties.getProxy()))
.logRequests(chatModelProperties.getLogRequests())
.logResponses(chatModelProperties.getLogResponses())
.customHeaders(chatModelProperties.getCustomHeaders())
.build();
}

Expand All @@ -59,10 +63,13 @@ OpenAiStreamingChatModel openAiStreamingChatModel(Properties properties) {
.responseFormat(chatModelProperties.getResponseFormat())
.seed(chatModelProperties.getSeed())
.user(chatModelProperties.getUser())
.strictTools(chatModelProperties.getStrictTools())
.parallelToolCalls(chatModelProperties.getParallelToolCalls())
.timeout(chatModelProperties.getTimeout())
.proxy(ProxyProperties.convert(chatModelProperties.getProxy()))
.logRequests(chatModelProperties.getLogRequests())
.logResponses(chatModelProperties.getLogResponses())
.customHeaders(chatModelProperties.getCustomHeaders())
.build();
}

Expand All @@ -81,6 +88,7 @@ OpenAiLanguageModel openAiLanguageModel(Properties properties) {
.proxy(ProxyProperties.convert(languageModelProperties.getProxy()))
.logRequests(languageModelProperties.getLogRequests())
.logResponses(languageModelProperties.getLogResponses())
.customHeaders(languageModelProperties.getCustomHeaders())
.build();
}

Expand All @@ -98,6 +106,7 @@ OpenAiStreamingLanguageModel openAiStreamingLanguageModel(Properties properties)
.proxy(ProxyProperties.convert(languageModelProperties.getProxy()))
.logRequests(languageModelProperties.getLogRequests())
.logResponses(languageModelProperties.getLogResponses())
.customHeaders(languageModelProperties.getCustomHeaders())
.build();
}

Expand All @@ -117,6 +126,7 @@ OpenAiEmbeddingModel openAiEmbeddingModel(Properties properties) {
.proxy(ProxyProperties.convert(embeddingModelProperties.getProxy()))
.logRequests(embeddingModelProperties.getLogRequests())
.logResponses(embeddingModelProperties.getLogResponses())
.customHeaders(embeddingModelProperties.getCustomHeaders())
.build();
}

Expand All @@ -134,6 +144,7 @@ OpenAiModerationModel openAiModerationModel(Properties properties) {
.proxy(ProxyProperties.convert(moderationModelProperties.getProxy()))
.logRequests(moderationModelProperties.getLogRequests())
.logResponses(moderationModelProperties.getLogResponses())
.customHeaders(moderationModelProperties.getCustomHeaders())
.build();
}

Expand All @@ -158,6 +169,7 @@ OpenAiImageModel openAiImageModel(Properties properties) {
.logResponses(imageModelProperties.getLogResponses())
.withPersisting(imageModelProperties.getWithPersisting())
.persistTo(imageModelProperties.getPersistTo())
.customHeaders(imageModelProperties.getCustomHeaders())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ class ChatModelProperties {
Double frequencyPenalty;
Map<String, Integer> logitBias;
String responseFormat;
Boolean strictJsonSchema;
Integer seed;
String user;
Boolean strictTools;
Boolean parallelToolCalls;
Duration timeout;
Integer maxRetries;
@NestedConfigurationProperty
ProxyProperties proxy;
Boolean logRequests;
Boolean logResponses;
Map<String, String> customHeaders;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.time.Duration;
import java.util.Map;

@Getter
@Setter
Expand All @@ -22,4 +23,5 @@ class EmbeddingModelProperties {
ProxyProperties proxy;
Boolean logRequests;
Boolean logResponses;
Map<String, String> customHeaders;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import java.nio.file.Path;
import java.time.Duration;
import java.util.Map;

@Getter
@Setter
Expand All @@ -28,4 +29,5 @@ class ImageModelProperties {
Boolean logResponses;
Boolean withPersisting;
Path persistTo;
Map<String, String> customHeaders;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.time.Duration;
import java.util.Map;

@Getter
@Setter
Expand All @@ -21,4 +22,5 @@ class LanguageModelProperties {
ProxyProperties proxy;
Boolean logRequests;
Boolean logResponses;
Map<String, String> customHeaders;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.time.Duration;
import java.util.Map;

@Getter
@Setter
Expand All @@ -20,4 +21,5 @@ class ModerationModelProperties {
ProxyProperties proxy;
Boolean logRequests;
Boolean logResponses;
Map<String, String> customHeaders;
}
2 changes: 1 addition & 1 deletion langchain4j-qianfan-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-redis-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-spring-boot-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion langchain4j-vertex-ai-gemini-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-spring</artifactId>
<version>0.34.0-SNAPSHOT</version>
<version>0.34.0</version>
<packaging>pom</packaging>

<name>langchain4j-spring parent POM</name>
Expand Down
Loading