-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open AI integration. #400
Comments
This prompt is not working properly: Act as language server with knowledge of glimmer syntax, ember.js, javaScript and typescript. Script: import Component from '@glimmer/component';
interface IAnswerCorrectnessWidgetComponentArgs {
isCorrect: boolean;
}
function getRandomInt(min: number, max: number) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
export default class AnswerCorrectnessWidgetComponent extends Component<IAnswerCorrectnessWidgetComponentArgs> {
maxImagesNumber = 8;
get imagePath() {
const randomNumber = this.getAllowedRandomNumber();
return `${
this.args.isCorrect ? 'victory/victory' : 'regret/regret'
}${randomNumber}`;
}
getAllowedRandomNumber(): number {
return getRandomInt(1, this.maxImagesNumber);
}
get itemStyle() {
const img = this.imagePath;
return `
background-image:
url('/pictures/${img}.jpg'),
url('/pictures/${img}.png'),
url('/pictures/${img}.jpeg'),
url('/pictures/${img}.svg');
`.trim();
}
} Template: <div
class="{{style-namespace "answer-correctness-widget"}}
flex flex-wrap flex-1 flex-col text-center justify-evenly pb-0 items-center rounded-large"
...attributes
>
<h3 class="mt-6 mb-6 text-2xl font-semibold">
{{if
@isCorrect
(t "exercise_messages.successfully")
(t "exercise_messages.unsuccessfully")
}}
</h3>
{{#if @isCorrect}}
<div
data-test-answer-correctness-widget
data-test-is-correct={{@isCorrect}}
data-test-isnt-correct={{not @isCorrect}}
class="object-center"
>
<Ui::Icon::CorrectAnswer />
</div>
{{else}}
{{! template-lint-configure no-inline-styles false }}
<div
data-test-answer-correctness-widget
data-test-is-correct={{@isCorrect}}
data-test-isnt-correct={{not @isCorrect}}
aria-label={{html-safe (concat (t "exercise_messages.successfully"))}}
class="answer-correctness-widget flex-1 mx-auto rounded"
></div>{{$$
{{/if}}
</div> |
Here is list of prompts we could support.
The text was updated successfully, but these errors were encountered: