sparknlp.annotator.openai.openai_embeddings#

Contains classes for OpenAIEmbeddings.

Module Contents#

Classes#

OpenAIEmbeddings

Base class for :py:class:`Model`s that wrap Java/Scala

class OpenAIEmbeddings(classname='com.johnsnowlabs.ml.ai.OpenAIEmbeddings', java_model=None)[source]#

Base class for :py:class:`Model`s that wrap Java/Scala implementations. Subclasses should inherit this class before param mix-ins, because this sets the UID from the Java model.

setModel(value)[source]#

Sets model ID of the OpenAI model to use

Parameters:
valuestr

ID of the OpenAI model to use

setUser(value)[source]#

Sets a unique identifier representing your end-user

Parameters:
valuestr

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.