| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 |
- Android
- VM arguments
- Java
- buildconfigfield
- EditText
- defaultconfig
- DispatchQueue
- 3rd part
- BindingAdapter
- data binding
- Jetpack
- mac
- ndkVersion
- IOS
- Eclipse
- Compose
- 3rd framework
- Andorid
- arm-linux-androideabi
- Kotlin
- retrofit
- boot
- gradle
- NDK
- Framework
- xcframework
- Swift
- Registering an InstanceCreator with Gson for this type may fix this problem
- AOS
- Chat GPT
- Today
- Total
목록retrofit (4)
grape
Problems converting Java project to Kotlin Occurs while retofit is parsing the response body (Unable to invoke no-args constructor for retrofit2.Call. Registering an InstanceCreator with Gson for this type may fix this problem.) Use retrofit version val retrofit_version = "2.9.0" implementation("com.squareup.retrofit2:retrofit:$retrofit_version") implementation("com.squareup.retrofit2:converter-..
void requestGPT(final String requestText){ new Thread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub String domain ="https://api.openai.com/v1/chat/"; GPTRetrofitInterface mRetrofitInterface = RetrofitGPT .getClient(domain).create(GPTRetrofitInterface.class); try { gptBody body = new gptBody(); body.model = "gpt-3.5-turbo"; body.messages[0].role = "user"; body...
Request Body import com.google.gson.annotations.SerializedName; public class GptCall { @SerializedName("model") public String model; @SerializedName("messages") public messages messages; @SerializedName("max_tokens") public String max_tokens; public class messages { public String role; public String content; } } Request Body Json String Example //String json = "{\"model\": \"gpt-3.5-turbo\", \"m..
OKHttpclient import java.io.IOException; import java.util.concurrent.TimeUnit; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.logging.HttpLoggingInterceptor; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.scalars.ScalarsConverterFactory; public class RetrofitGPT ..