Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bc81a29

Browse filesBrowse files
committed
Require all steps to run in java 1.8
There's definitely a better way to manage version, but trying to run individual steps against later versions was causing my problems than it solved. I'll think of the best way to handle this.
1 parent 987801b commit bc81a29
Copy full SHA for bc81a29

File tree

Expand file treeCollapse file tree

6 files changed

+11
-44
lines changed
Filter options
Expand file treeCollapse file tree

6 files changed

+11
-44
lines changed

‎.github/workflows/gradle-wrapper-validation.yml

Copy file name to clipboardExpand all lines: .github/workflows/gradle-wrapper-validation.yml
-14Lines changed: 0 additions & 14 deletions
This file was deleted.

‎.github/workflows/publish.yml

Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
+3-9Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,19 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414

15-
- name: Set up JDK 17
15+
- name: Set up JDK 1.8
1616
uses: actions/setup-java@v3
1717
with:
1818
distribution: temurin
19-
java-version: 17
19+
java-version: 8
2020

2121
- name: Test
2222
run: ./gradlew test
2323
env:
2424
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
2525

26-
- name: Set up JDK 1.8
27-
uses: actions/setup-java@v3
28-
with:
29-
distribution: temurin
30-
java-version: 8
31-
3226
- name: Publish
33-
run: ./gradlew build -x :example:build publish --no-parallel
27+
run: ./gradlew build publish --no-parallel
3428
env:
3529
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
3630
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}

‎.github/workflows/pull_request.yml

Copy file name to clipboardExpand all lines: .github/workflows/pull_request.yml
+2-11Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,5 @@ jobs:
1717
distribution: temurin
1818
java-version: 8
1919

20-
- name: Compile Artifacts
21-
run: ./gradlew api:compileJava client:compileJava service:compileJava
22-
23-
- name: Set up JDK 17
24-
uses: actions/setup-java@v3
25-
with:
26-
distribution: temurin
27-
java-version: 17
28-
29-
- name: Compile Tests
30-
run: ./gradlew compileTestJava
20+
- name: Compile
21+
run: ./gradlew compileJava compileTestJava

‎.github/workflows/test.yml

Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313

14-
- name: Set up JDK 17
14+
- name: Set up JDK 1.8
1515
uses: actions/setup-java@v3
1616
with:
1717
distribution: temurin
18-
java-version: 17
18+
java-version: 8
1919

2020
- name: Test
2121
run: ./gradlew test --stacktrace

‎example/src/main/java/example/OpenAiApiDynamicFunctionExample.java

Copy file name to clipboardExpand all lines: example/src/main/java/example/OpenAiApiDynamicFunctionExample.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void main(String... args) {
3636
.name("unit")
3737
.type("string")
3838
.description("The temperature unit, can be 'celsius' or 'fahrenheit'")
39-
.enumValues(Set.of("celsius", "fahrenheit"))
39+
.enumValues(new HashSet<>(Arrays.asList("celsius", "fahrenheit")))
4040
.required(true)
4141
.build())
4242
.build();

‎service/src/test/java/com/theokanning/openai/service/ChatCompletionTest.java

Copy file name to clipboardExpand all lines: service/src/test/java/com/theokanning/openai/service/ChatCompletionTest.java
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@
77
import com.theokanning.openai.completion.chat.*;
88
import org.junit.jupiter.api.Test;
99

10-
import java.util.ArrayList;
11-
import java.util.HashMap;
12-
import java.util.List;
13-
import java.util.Set;
14-
import java.util.Collections;
10+
import java.util.*;
1511

1612
import static org.junit.jupiter.api.Assertions.*;
1713

@@ -164,7 +160,7 @@ void createChatCompletionWithDynamicFunctions() {
164160
.name("unit")
165161
.type("string")
166162
.description("The temperature unit, can be 'celsius' or 'fahrenheit'")
167-
.enumValues(Set.of("celsius", "fahrenheit"))
163+
.enumValues(new HashSet<>(Arrays.asList("celsius", "fahrenheit")))
168164
.required(true)
169165
.build())
170166
.build();
@@ -273,7 +269,7 @@ void streamChatCompletionWithDynamicFunctions() {
273269
.name("unit")
274270
.type("string")
275271
.description("The temperature unit, can be 'celsius' or 'fahrenheit'")
276-
.enumValues(Set.of("celsius", "fahrenheit"))
272+
.enumValues(new HashSet<>(Arrays.asList("celsius", "fahrenheit")))
277273
.required(true)
278274
.build())
279275
.build();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.