-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 2.121.1
- Loading branch information
Showing
145 changed files
with
3,596 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,12 @@ cffi | |
* Source code: https://pypi.org/project/cffi/#files | ||
* Project home: https://cffi.readthedocs.io/en/latest | ||
|
||
sseclient | ||
* Copyright 2024 Maxime Petazzoni [email protected] | ||
* License: Apache License 2.0 | ||
* Source code: https://github.com/mpetazzoni/sseclient | ||
* Project home: https://github.com/mpetazzoni/sseclient | ||
|
||
=============================== Licenses =============================== | ||
|
||
------------------------------ MIT License ----------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,7 +186,11 @@ urllib3 | |
* Source code: https://github.com/urllib3/urllib3 | ||
* Project home: https://urllib3.readthedocs.io | ||
|
||
|
||
sseclient | ||
* Copyright 2024 Maxime Petazzoni [email protected] | ||
* License: Apache License 2.0 | ||
* Source code: https://github.com/mpetazzoni/sseclient | ||
* Project home: https://github.com/mpetazzoni/sseclient | ||
|
||
=============================== Licenses =============================== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
.../log_analytics/models/oci.log_analytics.models.CreateTableCommandDescriptor.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CreateTableCommandDescriptor | ||
============================ | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: CreateTableCommandDescriptor | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
docs/api/log_analytics/models/oci.log_analytics.models.Dependency.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Dependency | ||
========== | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: Dependency | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
docs/api/log_analytics/models/oci.log_analytics.models.DependentParser.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DependentParser | ||
=============== | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: DependentParser | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
docs/api/log_analytics/models/oci.log_analytics.models.DependentSource.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DependentSource | ||
=============== | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: DependentSource | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
docs/api/log_analytics/models/oci.log_analytics.models.LogAnalyticsMetadata.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LogAnalyticsMetadata | ||
==================== | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: LogAnalyticsMetadata | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
...og_analytics/models/oci.log_analytics.models.LogAnalyticsMetadataCollection.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LogAnalyticsMetadataCollection | ||
============================== | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: LogAnalyticsMetadataCollection | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
...i/log_analytics/models/oci.log_analytics.models.LogAnalyticsMetadataDetails.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LogAnalyticsMetadataDetails | ||
=========================== | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: LogAnalyticsMetadataDetails | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
...i/log_analytics/models/oci.log_analytics.models.LogAnalyticsMetadataSummary.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
LogAnalyticsMetadataSummary | ||
=========================== | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: LogAnalyticsMetadataSummary | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
...api/log_analytics/models/oci.log_analytics.models.SequenceCommandDescriptor.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SequenceCommandDescriptor | ||
========================= | ||
|
||
.. currentmodule:: oci.log_analytics.models | ||
|
||
.. autoclass:: SequenceCommandDescriptor | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/api/vn_monitoring/models/oci.vn_monitoring.models.OnPremEndpoint.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
OnPremEndpoint | ||
============== | ||
|
||
.. currentmodule:: oci.vn_monitoring.models | ||
|
||
.. autoclass:: OnPremEndpoint | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# coding: utf-8 | ||
# Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. | ||
# 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. | ||
|
||
########################################################################## | ||
# generate_text_demo.py | ||
# Supports Python 3 | ||
########################################################################## | ||
# Info: | ||
# Get texts from LLM model for given prompts using OCI Generative AI Service. | ||
########################################################################## | ||
# Application Command line(no parameter needed) | ||
# python generate_text_demo.py | ||
########################################################################## | ||
import oci | ||
import json | ||
|
||
# Setup basic variables | ||
# Auth Config | ||
# TODO: Please update config profile name and use the compartmentId that has policies grant permissions for using Generative AI Service | ||
compartment_id = "<compartment_ocid>" | ||
CONFIG_PROFILE = "DEFAULT" | ||
config = oci.config.from_file('~/.oci/config', CONFIG_PROFILE) | ||
|
||
# Service endpoint | ||
endpoint = "https://inference.generativeai.us-chicago-1.oci.oraclecloud.com" | ||
|
||
generative_ai_inference_client = oci.generative_ai_inference.GenerativeAiInferenceClient(config=config, service_endpoint=endpoint, retry_strategy=oci.retry.NoneRetryStrategy(), timeout=(10, 240)) | ||
|
||
cohere_generate_text_request = oci.generative_ai_inference.models.CohereLlmInferenceRequest() | ||
cohere_generate_text_request.prompt = "Tell me one fact about earth" | ||
cohere_generate_text_request.is_stream = True | ||
cohere_generate_text_request.max_tokens = 20 | ||
cohere_generate_text_request.temperature = 0.75 | ||
cohere_generate_text_request.top_p = 0.7 | ||
cohere_generate_text_request.frequency_penalty = 1.0 | ||
|
||
generate_text_detail = oci.generative_ai_inference.models.GenerateTextDetails() | ||
generate_text_detail.serving_mode = oci.generative_ai_inference.models.OnDemandServingMode(model_id="cohere.command") | ||
# generate_text_detail.serving_mode = oci.generative_ai.models.DedicatedServingMode(endpoint_id="custom-model-endpoint") # for custom model from Dedicated AI Cluster | ||
generate_text_detail.compartment_id = compartment_id | ||
generate_text_detail.inference_request = cohere_generate_text_request | ||
|
||
if "<compartment_ocid>" in compartment_id: | ||
print("ERROR:Please update your compartment id in target python file") | ||
quit() | ||
|
||
generate_text_response = generative_ai_inference_client.generate_text(generate_text_detail) | ||
|
||
# Print result | ||
print("**************************Generate Texts Result**************************") | ||
print(vars(generate_text_response)) | ||
|
||
for event in generate_text_response.data.events(): | ||
print(json.loads(event.data)["text"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.