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.0.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.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_embeddings_oracleai-0.3.0.tar.gz
Algorithm Hash digest
SHA256 98454784fcbdc834ae43ab64dd13ed0b732f1580eb8bee9093eaeac0d6c2b133
MD5 e78e6267be1b38fb26aa8f3862b70a78
BLAKE2b-256 65df06255934e2a7111fa9d957f0bcdb5e3212b91a9fdd1c6eadb1f69705dce6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_embeddings_oracleai-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 902741081d653f6437969cb6ee05ca32194645ae3592abd6b0a09fefc1854b23
MD5 f1f4bde77c2c26dd0dd81d1205649d78
BLAKE2b-256 48f95ce26b87ced82c5321b6ae455c10020a16bec4d5585c987a836dba554a4c

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