19 lines
551 B
Java
19 lines
551 B
Java
package com.example.pap;
|
|
|
|
import retrofit2.Retrofit;
|
|
import retrofit2.converter.gson.GsonConverterFactory;
|
|
|
|
public class AiConfig {
|
|
private static Retrofit retrofit;
|
|
private static final String BASE_URL = "https://openrouter.ai/api/v1/";
|
|
|
|
public static Retrofit getRetrofit() {
|
|
if (retrofit == null) {
|
|
retrofit = new Retrofit.Builder()
|
|
.baseUrl(BASE_URL)
|
|
.addConverterFactory(GsonConverterFactory.create())
|
|
.build();
|
|
}
|
|
return retrofit;
|
|
}
|
|
} |