lambiengcode / compose-chatgpt-kotlin-android-chatbot

Compose ChatGPT Kotlin - Android Chatbot using Kotlin + Jetpack Compose + Coroutine + MVVM + Retrofit2 + OpenAI's GPT-3 API. Allow stream response from ChatGPT API.
https://youtube.com/shorts/esLh-n3Ao5U
MIT License
224 stars 34 forks source link

Feature Request: Option to pick the GPT model #15

Open TimRivoli opened 1 year ago

TimRivoli commented 1 year ago

It would be nice to have an option under Settings to pick the GPT model. 3.5 Turbo is nice but I would like to test different models, at least 4.0.

lambiengcode commented 1 year ago

You can edit in file app/src/main/java/com/chatgptlite/wanted/models/TextCompletionsParam.kt:

data class TextCompletionsParam(
    @SerializedName("prompt")
    val promptText: String = "",
    @SerializedName("temperature")
    val temperature: Double = 0.9,
    @SerializedName("top_p")
    val topP: Double = 1.0,
    @SerializedName("n")
    val n: Int = 1,
    @SerializedName("stream")
    var stream: Boolean = true,
    @SerializedName("maxTokens")
    val maxTokens: Int = 2048,
    @SerializedName("model")
    val model: GPTModel = GPTModel.gpt35Turbo, <--- set default model here
    @SerializedName("messages")
    val messagesTurbo: List<MessageTurbo> = emptyList(),
)
TimRivoli commented 1 year ago

Yes, I know I can update it there. I just think it would be nice to select it in settings. Also temperature. And a default system message.