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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llama_index_embeddings_oracleai-0.2.0.tar.gz
.
File metadata
- Download URL: llama_index_embeddings_oracleai-0.2.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e3614a64f4bf1bf37164a9322e9c84cc0a8a1fe89f7e67e6eacec2b5918fc63 |
|
MD5 | e4ad758502f81a20eca36643f516d6de |
|
BLAKE2b-256 | fe966af83f8781c76a9d1386b7b311485351b5ac3b6fe50bad64458009c3960b |
File details
Details for the file llama_index_embeddings_oracleai-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_embeddings_oracleai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9b979b8a2b8a4831489cd24b883b9c4490160c34a80d8ea7971efa7e91a8512 |
|
MD5 | 83a34309efab7cea31d7a010ebc2db63 |
|
BLAKE2b-256 | 674c2ed0a54545de2e10f76b862a734aea97a2fe452aff87166284637ab25d8b |