Represents an OpenAIConfig.

Implements

Constructors

  • Constructs a new OpenAIConfig.

    Parameters

    Returns OpenAIConfig

Properties

model: string

OpenAIConfig model.

secretNameApiKey: string

OpenAIConfig secretNameApiKey.

temperature: number

OpenAIConfig temperature.

userPrompt: string

OpenAIConfig userPrompt.

Methods

  • Converts this OpenAIConfig to JSON.

    Returns { [k: string]: any }

    JSON object

  • Creates a new OpenAIConfig instance using the specified properties.

    Parameters

    Returns OpenAIConfig

    OpenAIConfig instance

  • Decodes an OpenAIConfig message from the specified reader or buffer.

    Parameters

    • reader: Uint8Array<ArrayBufferLike> | Reader

      Reader or buffer to decode from

    • Optionallength: number

      Message length if known beforehand

    Returns OpenAIConfig

    OpenAIConfig

    If the payload is not a reader or valid buffer

    If required fields are missing

  • Decodes an OpenAIConfig message from the specified reader or buffer, length delimited.

    Parameters

    • reader: Uint8Array<ArrayBufferLike> | Reader

      Reader or buffer to decode from

    Returns OpenAIConfig

    OpenAIConfig

    If the payload is not a reader or valid buffer

    If required fields are missing

  • Encodes the specified OpenAIConfig message. Does not implicitly verify messages.

    Parameters

    • message: IOpenAIConfig

      OpenAIConfig message or plain object to encode

    • Optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Encodes the specified OpenAIConfig message, length delimited. Does not implicitly verify messages.

    Parameters

    • message: IOpenAIConfig

      OpenAIConfig message or plain object to encode

    • Optionalwriter: Writer

      Writer to encode to

    Returns Writer

    Writer

  • Creates an OpenAIConfig message from a plain object. Also converts values to their respective internal types.

    Parameters

    • object: { [k: string]: any }

      Plain object

    Returns OpenAIConfig

    OpenAIConfig

  • Gets the default type url for OpenAIConfig

    Parameters

    Returns string

    The default type url

  • Creates a plain object from an OpenAIConfig message. Also converts values to other types if specified.

    Parameters

    • message: OpenAIConfig

      OpenAIConfig

    • Optionaloptions: IConversionOptions

      Conversion options

    Returns { [k: string]: any }

    Plain object

  • Verifies an OpenAIConfig message.

    Parameters

    • message: { [k: string]: any }

      Plain object to verify

    Returns string

    null if valid, otherwise the reason why it is not