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

Automate release #4

Merged
merged 7 commits into from
Jan 30, 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.25.0
- LangChain4j version: e.g. 0.26.0
- Java version: e.g. 11
- Spring Boot version: e.g. 2.7.18

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
workflow_dispatch:

jobs:

release:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: release
run: mvn -B -U --fail-at-end -Psign clean deploy
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
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.26.0-SNAPSHOT</version>
<version>0.26.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void onComplete(Response<AiMessage> response) {
public void onError(Throwable error) {
}
});
Response<AiMessage> response = future.get(30, SECONDS);
Response<AiMessage> response = future.get(60, SECONDS);
assertThat(response.content().text()).contains("Berlin");

assertThat(context.getBean(OllamaStreamingChatModel.class)).isSameAs(streamingChatLanguageModel);
Expand Down Expand Up @@ -141,7 +141,7 @@ public void onComplete(Response<String> response) {
public void onError(Throwable error) {
}
});
Response<String> response = future.get(30, SECONDS);
Response<String> response = future.get(60, SECONDS);
assertThat(response.content()).contains("Berlin");

assertThat(context.getBean(OllamaStreamingLanguageModel.class)).isSameAs(streamingLanguageModel);
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.26.0-SNAPSHOT</version>
<version>0.26.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ OpenAiEmbeddingModel openAiEmbeddingModel(Properties properties) {
.apiKey(embeddingModelProperties.getApiKey())
.organizationId(embeddingModelProperties.getOrganizationId())
.modelName(embeddingModelProperties.getModelName())
.dimensions(embeddingModelProperties.getDimensions())
.user(embeddingModelProperties.getUser())
.timeout(embeddingModelProperties.getTimeout())
.maxRetries(embeddingModelProperties.getMaxRetries())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class EmbeddingModelProperties {
String apiKey;
String organizationId;
String modelName;
Integer dimensions;
String user;
Duration timeout;
Integer maxRetries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void onComplete(Response<AiMessage> response) {
public void onError(Throwable error) {
}
});
Response<AiMessage> response = future.get(30, SECONDS);
Response<AiMessage> response = future.get(60, SECONDS);
assertThat(response.content().text()).contains("Berlin");

assertThat(context.getBean(OpenAiStreamingChatModel.class)).isSameAs(streamingChatLanguageModel);
Expand Down Expand Up @@ -122,7 +122,7 @@ public void onComplete(Response<String> response) {
public void onError(Throwable error) {
}
});
Response<String> response = future.get(30, SECONDS);
Response<String> response = future.get(60, SECONDS);
assertThat(response.content()).contains("Berlin");

assertThat(context.getBean(OpenAiStreamingLanguageModel.class)).isSameAs(streamingLanguageModel);
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.26.0-SNAPSHOT</version>
<version>0.26.0</version>
<packaging>pom</packaging>

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