createThreadAndRun method

Future<ThreadRun?> createThreadAndRun(
  1. String assistantId, [
  2. List<Message>? messages
])

Implementation

Future<ThreadRun?> createThreadAndRun(String assistantId,
    [List<Message>? messages]) async {
  final result = await _repository.createThreadAndRun(assistantId, messages);

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