Create a typescript rules engine in xstate that takes in a fiat or crypto transaction…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
Create a typescript rules engine in xstate that takes in a fiat or crypto transaction which allows us to stop/approve withdrawals
- Assistant
import { Machine, Context } from 'xstate';
interface Transaction { id: string; type: 'fiat' | 'crypto'; amount: number; status: 'pending' | 'approved' | 'stopped'; }
type State = 'idle' | 'processing' | 'error';
type Event = | { type: 'stop' } | { type: 'approve' } | { type: 'error', payload: string } | { type: 'transaction', payload: Transaction };
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.