createRun method

Future<String?> createRun({
  1. required String threadId,
  2. required String assistantId,
})

Implementation

Future<String?> createRun(
    {required String threadId, required String assistantId}) async {
  final result = await _repository.createRun(threadId, assistantId);

  return result.fold(
    (l) => null,
    (r) => r.id,
  );
}