corrige o erro da camera e da ia não funcionar e mudar o layout futuramente
This commit is contained in:
19
app/src/main/java/com/example/pap/AiConfig.java
Normal file
19
app/src/main/java/com/example/pap/AiConfig.java
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user