Skip to content
TheChatArchiveThe Chat Archive
Yiyi-34b-chat· 01.AIHugging Face Arena Human Preference 55K

исправь код: import 'package:flutter/material.dart'; import 'dart:math'; void main() {…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with gpt-3.5-turbo-0613’s answer.
  1. User

    исправь код: import 'package:flutter/material.dart'; import 'dart:math';

    void main() { runApp(MyApp()); }

    class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Двойной кубик', theme: ThemeData.dark(), home: DiceRollerHome(), ); } }

    class DiceRollerHome extends StatefulWidget { @override _DiceRollerHomeState createState() => _DiceRollerHomeState(); }

    class _DiceRollerHomeState extends State { int leftResult = 0; int rightResult = 0;

    void rollLeftDice() { setState(() { leftResult = Random().nextInt(6) + 1; }); }

    void rollRightDice() { setState(() { rightResult = Random().nextInt(6) + 1; }); }

    @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Двойной кубик')), body: Center( child: Column(children: [ ElevatedButton( onPressed: rollLeftDice, child: Text('Подбросить левый кубик'), ), SizedBox(height: 20), Text("Левый кубик: leftResult"),ElevatedButton(onPressed:rollRightDice,child:Text(′Подброситьправыйкубик′),),SizedBox(height:20),Text("Правыйкубик:leftResult"), ElevatedButton( onPressed: rollRightDice, child: Text('Подбросить правый кубик'), ), SizedBox(height: 20), Text("Правый кубик: rightResult"), ], ), ); } }

  2. Yi Assistant

    import 'package:flutter/material.dart';

    void main() { runApp(MyApp()); }

    class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Double Dice', theme: ThemeData.dark(), home: DiceRollerHome(), ); } }

    class DiceRollerHome extends StatefulWidget { @override _DiceRollerHomeState createState() => _DiceRollerHomeState(); }

    class _DiceRollerHomeState extends State { int leftResult = 0; int rightResult = 0;

    void rollLeftDice() { setState(() { leftResult = Random().nextInt(6) + 1; }); }

    void rollRightDice() { setState(() { rightResult = Random().nextInt(6) + 1; }); }

    @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text('Double Dice')), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ ElevatedButton( onPressed: rollLeftDice, child: Text('Roll Left Dice'), ), SizedBox(height: 20), Text("Left Dice: leftResult"),ElevatedButton(onPressed:rollRightDice,child:Text(′RollRightDice′),),SizedBox(height:20),Text("RightDice:leftResult"), ElevatedButton( onPressed: rollRightDice, child: Text('Roll Right Dice'), ), SizedBox(height: 20), Text("Right Dice: rightResult"), ], ), ), ); } }

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.