diff --git a/app/src/main/java/univ/earthbreaker/namu/data/ApiFactory.kt b/app/src/main/java/univ/earthbreaker/namu/data/ApiFactory.kt index a2081ca..80f9cd8 100644 --- a/app/src/main/java/univ/earthbreaker/namu/data/ApiFactory.kt +++ b/app/src/main/java/univ/earthbreaker/namu/data/ApiFactory.kt @@ -20,18 +20,20 @@ object ApiFactory { val retrofitForGrowTreeServer: Retrofit by lazy { Retrofit.Builder().baseUrl(BuildConfig.GROW_TREE_BASE_URL).client(client) - .addConverterFactory(Json.asConverterFactory("application/json".toMediaType())).build() + .addConverterFactory( + Json.asConverterFactory("application/json".toMediaType()), + ).build() } - val retrofitForChatGPT: Retrofit by lazy { - Retrofit.Builder().baseUrl(BuildConfig.CHAT_GPT_BASE_URL).client(client) + val retrofitForOpenAiService: Retrofit by lazy { + Retrofit.Builder().baseUrl(BuildConfig.OPEN_AI_BASE_URL).client(client) .addConverterFactory(Json.asConverterFactory("application/json".toMediaType())).build() } inline fun create(forWhichServer: Server): T = when (forWhichServer) { Server.GrowTreeServer -> retrofitForGrowTreeServer.create(T::class.java) - Server.ChatGPT -> retrofitForChatGPT.create(T::class.java) + Server.ChatGPT -> retrofitForOpenAiService.create(T::class.java) } }