Skip to content

Commit 7802707

Browse files
authored
Merge pull request #23 from mny459/main
[Fix] Fix change baseUrl not working after first request
2 parents 99f003e + 1eae30f commit 7802707

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/src/core/builder/base_api_url.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ import '../constants/config.dart';
55
@immutable
66
@internal
77
abstract class BaseApiUrlBuilder {
8-
static final String _baseUrl = OpenAIConfig.baseUrl;
9-
static final String _version = OpenAIConfig.version;
108

119
/// This is used to build the API url for all the requests, it will return a [String].
1210
/// if an [id] is provided, it will be added to the url as well.
1311
@internal
1412
static String build(String endpoint, [String? id, String? query]) {
15-
String apiLink = "$_baseUrl/$_version$endpoint";
13+
String apiLink = "${OpenAIConfig.baseUrl}/${OpenAIConfig.version}$endpoint";
1614
if (id != null) {
1715
apiLink += "/$id";
1816
}

0 commit comments

Comments
 (0)