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 if the input data cannot be parsed to form a valid model.
- 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