Base class for all assets used in the engine.

interface DialogModule {
    name: string;
    uniqueIdentifier: string;
    askQuestions(context: string, questions: string[], onQuestionsAnswerComplete: ((answers: Answer[]) => void), onQuestionsAnswerError: ((error: number, description: string) => void)): void;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

name: string

The name of the Asset in Lens Studio.

uniqueIdentifier: string

Methods

  • Sends a request to ask questions using the DialogModule. context is the text the model will use as context for answering the question. questions is a list of questions to ask. When answers are ready, onQuestionsAnswerComplete will be called with a list of Dialog.Answer objects corresponding to the questions in the questions list. onQuestionsAnswerError will be called if any error occurs.

    Parameters

    • context: string
    • questions: string[]
    • onQuestionsAnswerComplete: ((answers: Answer[]) => void)
        • (answers): void
        • Parameters

          Returns void

    • onQuestionsAnswerError: ((error: number, description: string) => void)
        • (error, description): void
        • Parameters

          • error: number
          • description: string

          Returns void

    Returns void

  • Returns the name of this object's type.

    Returns string

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean