-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDalleInteraction.js
24 lines (22 loc) · 982 Bytes
/
DalleInteraction.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import Interaction from './Interaction.js'
export class DalleInteraction extends Interaction {
constructor({id, type = 'Dalle', prompt = '', promptImgUrl = '404', response = '', responseImgUrl = '404', feedback = 0}) {
super({id, type, prompt, response, feedback});
this.promptImgUrl = promptImgUrl;
this.responseImgUrl = responseImgUrl;
}
show() {
console.log(`-----------------------------------------------------------------------------`);
console.log(`Interaction ${this.id} is a ${this.type} one.`);
console.log(`Prompt: ${this.prompt.slice(0, 20)}`);
console.log(`PromptImgUrl: ${this.promptImgUrl}`);
console.log(`Response: ${this.response.slice(0, 20)}`);
console.log(`ResponseImgUrl: ${this.responseImgUrl}`);
console.log(`Feedback: ${this.feedback}`);
console.log(`-----------------------------------------------------------------------------`);
}
isDalle() {
return true;
}
}
export default DalleInteraction;