LlamaIndex Embeddings Integration: Oracleai
This API is to generate an embedding from a text.
pip install llama-index-embeddings-oracleai
A sample example
from typing import TYPE_CHECKING
from llama_index.core.embeddings import BaseEmbedding
from llama_index.embeddings.oracleai import OracleEmbeddings
if TYPE_CHECKING:
import oracledb
""" get the Oracle connection """
conn = oracledb.connect(
user="<user>",
password="<password>",
dsn="<dsn>",
)
print("Oracle connection is established...")
""" params """
embedder_params = {"provider": "<provider_name>", "model": "<model_name>"}
proxy = "<proxy>"
""" instance """
embedder = OracleEmbeddings(conn=conn, params=embedder_params, proxy=proxy)
embed = embedder._get_text_embedding("Hello World, Text!")
print(f"Embedding generated by OracleEmbeddings: {embed}")
embed = embedder._get_query_embedding("Hello World, Query!")
print(f"Embedding generated by OracleEmbeddings: {embed}")
conn.close()
print("Connection is closed.")
Metadata
Release files for llama-index-embeddings-oracleai 0.5.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 | |
|---|---|---|---|
| llama_index_embeddings_oracleai-0.5.0.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_index_embeddings_oracleai-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.4 kB
Release files / llama_index_embeddings_oracleai-0.5.0.tar.gz
| Download URL | llama_index_embeddings_oracleai-0.5.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
affe075392107c51fa15a749b3be9be634bbf55f6de36405a8cdd1863bbd0dd8
|
|
BLAKE2b-256 checksum How to use checksums |
5f581e9c87960043b130669e9e8ac99fac5bb28b587b5099a6495c4ab28a6c4c
|
| 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_oracleai-0.5.0-py3-none-any.whl
| Download URL | llama_index_embeddings_oracleai-0.5.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3042b10e3af528466054c8db57aa97697e5aee2dc831be44efedc6950dca4d11
|
|
BLAKE2b-256 checksum How to use checksums |
02bf21deef292c4a887594d140a24a4373c6ddd3f4431446e002784cfd6b60a1
|
| 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}
|