Skip to content

Commit

Permalink
Releasing version 3.44.2
Browse files Browse the repository at this point in the history
Releasing version 3.44.2
  • Loading branch information
oci-dex-release-bot authored Jul 9, 2024
2 parents c031452 + 87d8e94 commit 351689c
Show file tree
Hide file tree
Showing 332 changed files with 1,826 additions and 848 deletions.
4 changes: 2 additions & 2 deletions bmc-accessgovernancecp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>oci-java-sdk-accessgovernancecp</artifactId>
Expand All @@ -15,7 +15,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
#

java.client.codegen.version = 2.78
java.minimum.client.codegen.version.from.client = 2.26
java.client.codegen.version = 2.100
java.minimum.client.codegen.version.from.client = 2.100

# @jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220518")
6 changes: 3 additions & 3 deletions bmc-addons/bmc-apache-configurator-jersey-addon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -17,14 +17,14 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-bom</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common-httpclient-jersey</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions bmc-addons/bmc-apache-configurator-jersey3-addon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -17,14 +17,14 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-bom</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common-httpclient-jersey3</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions bmc-addons/bmc-apache-connector-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -18,7 +18,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
</dependencies>
</project>
10 changes: 5 additions & 5 deletions bmc-addons/bmc-oke-workload-identity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>oci-java-sdk-addons</artifactId>
<groupId>com.oracle.oci.sdk</groupId>
<version>3.44.1</version>
<version>3.44.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -38,25 +38,25 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-core</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-identity</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-keymanagement</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions bmc-addons/bmc-resteasy-client-configurator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
</dependencies>
</project>
6 changes: 3 additions & 3 deletions bmc-addons/bmc-sasl-oke-workload-identity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<artifactId>oci-java-sdk-addons</artifactId>
<groupId>com.oracle.oci.sdk</groupId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -39,13 +39,13 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons-sasl</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons-oke-workload-identity</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions bmc-addons/bmc-sasl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-addons</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -60,7 +60,7 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
</dependencies>

Expand Down
8 changes: 4 additions & 4 deletions bmc-addons/bmc-sse-support-jersey3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>oci-java-sdk-addons</artifactId>
<groupId>com.oracle.oci.sdk</groupId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -150,12 +150,12 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-generativeaiinference</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -164,7 +164,7 @@
but the code in it needs it. -->
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common-httpclient-jersey3</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
import com.oracle.bmc.Region;
import com.oracle.bmc.auth.SessionTokenAuthenticationDetailsProvider;
import com.oracle.bmc.generativeaiinference.GenerativeAiInferenceClient;
import com.oracle.bmc.generativeaiinference.GenerativeAiInferenceSseHelper;
import com.oracle.bmc.generativeaiinference.model.*;
import com.oracle.bmc.generativeaiinference.requests.GenerateTextRequest;
import com.oracle.bmc.generativeaiinference.responses.GenerateTextResponse;
import com.oracle.bmc.http.ClientConfigurator;
import com.oracle.bmc.retrier.RetryConfiguration;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;

/**
* This class provides an example of how to use OCI Generative AI Service to generate text.
*
Expand All @@ -40,7 +42,7 @@ public class GenerateTextExample {
// TODO: Please update config profile name and use the compartmentId that has policies grant
// permissions for using Generative AI Service
private static final String CONFIG_PROFILE = "DEFAULT";
private static final String COMPARTMENT_ID = "compartment_id";
private static final String COMPARTMENT_ID = "<compartment_id>";

/**
* The entry point for the example.
Expand Down Expand Up @@ -69,13 +71,9 @@ public static void main(String[] args) throws Exception {
.build();
// Create and add new additional client configurator for sse support by using appropriate
// reader function
SseSupport sseSupport =
new SseSupport(GenerativeAiInferenceSseHelper.generateTextResultReader);
ClientConfigurator clientConfigurator = sseSupport.getClientConfigurator();
final GenerativeAiInferenceClient generativeAiInferenceClient =
GenerativeAiInferenceClient.builder()
.configuration(clientConfiguration)
.additionalClientConfigurator(clientConfigurator)
.build(provider);
generativeAiInferenceClient.setEndpoint(ENDPOINT);
generativeAiInferenceClient.setRegion(REGION);
Expand Down Expand Up @@ -110,13 +108,27 @@ public static void main(String[] args) throws Exception {

GenerateTextResponse generateTextResponse =
generativeAiInferenceClient.generateText(generateTextRequest);
CohereLlmInferenceResponse res =
(CohereLlmInferenceResponse)
generateTextResponse.getGenerateTextResult().getInferenceResponse();
for (GeneratedText genText : res.getGeneratedTexts()) {
System.out.print(genText.getText());
InputStream is = generateTextResponse.getEventStream();
// NOTE : Use try-with-resources or explicitly call is.close() to close the stream. This is
// important to avoid the issue mentioned in the link below
// https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdktroubleshooting.htm#javasdktroubleshooting_topic_program_hangs_for_an_indefinite_time
if (is != null) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) {
String line;
StringBuilder sb = new StringBuilder();
while ((line = reader.readLine()) != null) {
sb.append(line);
System.out.println(line);
}
}
} else {
CohereLlmInferenceResponse res =
(CohereLlmInferenceResponse)
generateTextResponse.getGenerateTextResult().getInferenceResponse();
for (GeneratedText genText : res.getGeneratedTexts()) {
System.out.print(genText.getText());
}
}

generativeAiInferenceClient.close();
}
}
8 changes: 4 additions & 4 deletions bmc-addons/bmc-sse-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>oci-java-sdk-addons</artifactId>
<groupId>com.oracle.oci.sdk</groupId>
<version>3.44.1</version>
<version>3.44.2</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -150,12 +150,12 @@
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
<dependency>
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-generativeaiinference</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -164,7 +164,7 @@
but the code in it needs it. -->
<groupId>com.oracle.oci.sdk</groupId>
<artifactId>oci-java-sdk-common-httpclient-jersey</artifactId>
<version>3.44.1</version>
<version>3.44.2</version>
</dependency>
</dependencies>

Expand Down
Loading

0 comments on commit 351689c

Please sign in to comment.