Skip to content

Commit

Permalink
Merge pull request #23 from mny459/main
Browse files Browse the repository at this point in the history
[Fix] Fix change baseUrl not working after first request
  • Loading branch information
anasfik authored Mar 21, 2023
2 parents 99f003e + 1eae30f commit 7802707
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/src/core/builder/base_api_url.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import '../constants/config.dart';
@immutable
@internal
abstract class BaseApiUrlBuilder {
static final String _baseUrl = OpenAIConfig.baseUrl;
static final String _version = OpenAIConfig.version;

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

0 comments on commit 7802707

Please sign in to comment.