Function createChatRequest

  • Creates a chat request for the OpenAI API.

    Parameters

    • jsondir: string

      The directory where the JSON files are located.

    • isReply: boolean

      A boolean value indicating whether the message is a reply.

    • temperature: number

      A number representing the randomness of the AI's output. Higher values mean more randomness.

    • instruction: string

      A string containing the instruction for the AI.

    • input: string

      A string containing the user's input.

    Returns IOpenaiChatRequestOptions

    An object conforming to the IOpenaiChatRequestOptions interface, containing the messages, temperature, and retry options.

Generated using TypeDoc