OracleEmbeddings#

class langchain_community.embeddings.oracleai.OracleEmbeddings[source]#

Bases: BaseModel, Embeddings

Get Embeddings

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param conn: Any = None#

Embedding Parameters

param params: Dict[str, Any] [Required]#

Proxy

param proxy: str | None = None#
async aembed_documents(texts: list[str]) list[list[float]]#

Asynchronous Embed search docs.

Parameters:

texts (list[str]) – List of text to embed.

Returns:

List of embeddings.

Return type:

list[list[float]]

async aembed_query(text: str) list[float]#

Asynchronous Embed query text.

Parameters:

text (str) – Text to embed.

Returns:

Embedding.

Return type:

list[float]

embed_documents(texts: List[str]) List[List[float]][source]#

Compute doc embeddings using an OracleEmbeddings. :param texts: The list of texts to embed.

Returns:

List of embeddings, one for each input text.

Parameters:

texts (List[str])

Return type:

List[List[float]]

embed_query(text: str) List[float][source]#

Compute query embedding using an OracleEmbeddings. :param text: The text to embed.

Returns:

Embedding for the text.

Parameters:

text (str)

Return type:

List[float]

static load_onnx_model(conn: Connection, dir: str, onnx_file: str, model_name: str) None[source]#

Load an ONNX model to Oracle Database. :param conn: Oracle Connection, :param dir: Oracle Directory, :param onnx_file: ONNX file name, :param model_name: Name of the model.

Parameters:
  • conn (Connection)

  • dir (str)

  • onnx_file (str)

  • model_name (str)

Return type:

None

Examples using OracleEmbeddings