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.3.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_oracleai-0.3.1.tar.gz
Algorithm Hash digest
SHA256 80b764a5ef9841701e84c11fa19eebdd50dc8424788c387368ed9fb577098631
MD5 91395e8f26c77fa68b6abb235022c4e2
BLAKE2b-256 82fd894df6d192bf0b3c15da66474e012981604ca6d69414119f11ed9e29ab55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_oracleai-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae981251c7f24bc20403ada4504a3391cb26226542bdf492fb548a8f1641048f
MD5 d33f016dd59d268dfec74089dcd7f753
BLAKE2b-256 921ecbab0ded41261d562723c94589c9a9c42803f38ff511d43aaa3a9f3d0a92

See more details on using hashes here.

Supported by

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