LlamaIndex Embeddings Integration: Oracle Cloud Infrastructure (OCI) Data Science Service
Oracle Cloud Infrastructure (OCI) Data Science is a fully managed, serverless platform for data science teams to build, train, and manage machine learning models in Oracle Cloud Infrastructure.
It offers AI Quick Actions, which can be used to deploy embedding models in OCI Data Science. AI Quick Actions target users who want to quickly leverage the capabilities of AI. They aim to expand the reach of foundation models to a broader set of users by providing a streamlined, code-free, and efficient environment for working with foundation models. AI Quick Actions can be accessed from the Data Science Notebook.
Detailed documentation on how to deploy embedding models in OCI Data Science using AI Quick Actions is available here and here.
Installation
Install the required packages:
pip install oracle-ads llama-index-core llama-index-embeddings-oci-data-science
The oracle-ads is required to simplify the authentication within OCI Data Science.
Authentication
The authentication methods supported for LlamaIndex are equivalent to those used with other OCI services and follow the standard SDK authentication methods, specifically API Key, session token, instance principal, and resource principal. More details can be found here. Make sure to have the required policies to access the OCI Data Science Model Deployment endpoint.
Usage
import ads
from llama_index.embeddings.oci_data_science import OCIDataScienceEmbedding
ads.set_auth(auth="security_token", profile="<replace-with-your-profile>")
embedding = OCIDataScienceEmbedding(
endpoint="https://<MD_OCID>/predict",
)
e1 = embeddings.get_text_embedding("This is a test document")
print(e1)
e2 = embeddings.get_text_embedding_batch([
"This is a test document",
"This is another test document"
])
print(e2)
Async
import ads
from llama_index.embeddings.oci_data_science import OCIDataScienceEmbedding
ads.set_auth(auth="security_token", profile="<replace-with-your-profile>")
embedding = OCIDataScienceEmbedding(
endpoint="https://<MD_OCID>/predict",
)
e1 = await embeddings.aget_text_embedding("This is a test document")
print(e1)
e2 = await embeddings.aget_text_embedding_batch([
"This is a test document",
"This is another test document"
])
print(e2)
More examples
https://docs.llamaindex.ai/en/stable/examples/embeddings/oci_data_science/
Metadata
Release files for llama-index-embeddings-oci-data-science 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_embeddings_oci_data_science-0.4.0.tar.gz | 11.2 kB | Without provenance | Details for llama_index_embeddings_oci_data_science-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_embeddings_oci_data_science-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_embeddings_oci_data_science-0.4.0-py3-none-any.whl |
Total release size: 23.5 kB
Release files / llama_index_embeddings_oci_data_science-0.4.0.tar.gz
| Download URL | llama_index_embeddings_oci_data_science-0.4.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bc7a2b0c6785621c28c63f6e51d69d9751a71126d199b09d341e03bde997e24
|
|
BLAKE2b-256 checksum How to use checksums |
c7af4ec3f1c3a5aed60a9ccaef84ab5e9e8b74e6ccd0c234e3ac1c6416622343
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llama_index_embeddings_oci_data_science-0.4.0-py3-none-any.whl
| Download URL | llama_index_embeddings_oci_data_science-0.4.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b991ffb93c6f5798f8fd5ab385a5cd68030d2a6ea7eeaa60b15890b845501c61
|
|
BLAKE2b-256 checksum How to use checksums |
38564da6fc60376a40bf24d1106d6a0cc873dbc385180824dd0447abe9fed5ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llama-index-embeddings-oci-data-science 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.