INNER CODE UNIT · Dart

Edit

redevrx/chat_gpt_sdk · lib/src/edit.dart:11

class Edit {
  final OpenAIClient _client;

  Edit(this._client);

  ///Given a prompt and an instruction,
  /// the model will return an edited
  /// version of the prompt.[prompt]
  Future<EditResponse> prompt(
    EditRequest request, {
    void Function(CancelData cancelData)? onCancel,
  }) {
    return _client.post(
      _client.apiUrl + kEditPrompt,
      request.toJson(),
      onCancel: (it) => onCancel != null ? onCancel(it) : null,
      onSuccess: (it) => EditResponse.fromJson(it),
    );

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…