Skip to content

Commit

Permalink
chore: clean code
Browse files Browse the repository at this point in the history
openai_api.dart should NOT be imported in project source files
  • Loading branch information
trevorwang committed Nov 27, 2023
1 parent fa9e47d commit 9ebc047
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/src/audio/speech.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:cancellation_token_http/http.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:openai_api/openai_api.dart';
import '../client.dart';
import '../constants.dart';

part 'speech.freezed.dart';
part 'speech.g.dart';
Expand Down
4 changes: 3 additions & 1 deletion lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import 'dart:io';

import 'package:cancellation_token_http/http.dart' as http;
import 'package:cancellation_token_http/io_client.dart';
import 'package:openai_api/openai_api.dart';

import 'config.dart';
import 'errors.dart';

const dataPrefix = "data: ";

Expand Down
5 changes: 4 additions & 1 deletion lib/src/thread/thread_requests.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:cancellation_token_http/http.dart' hide get;
import 'package:openai_api/openai_api.dart';

import '../chat/completion.dart';
import '../client.dart';
import 'exports.dart';

extension ThreadCreate on OpenaiClient {
Future<Thread> createThread({CancellationToken? cancellationToken}) async {
Expand Down

0 comments on commit 9ebc047

Please sign in to comment.