Skip to main content

llama-index embeddings oracleai integration

Project description

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.")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_embeddings_oracleai-0.2.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file llama_index_embeddings_oracleai-0.2.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_oracleai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2e3614a64f4bf1bf37164a9322e9c84cc0a8a1fe89f7e67e6eacec2b5918fc63
MD5 e4ad758502f81a20eca36643f516d6de
BLAKE2b-256 fe966af83f8781c76a9d1386b7b311485351b5ac3b6fe50bad64458009c3960b

See more details on using hashes here.

File details

Details for the file llama_index_embeddings_oracleai-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_embeddings_oracleai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9b979b8a2b8a4831489cd24b883b9c4490160c34a80d8ea7971efa7e91a8512
MD5 83a34309efab7cea31d7a010ebc2db63
BLAKE2b-256 674c2ed0a54545de2e10f76b862a734aea97a2fe452aff87166284637ab25d8b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page