Skip to content

Commit 314e863

Browse files
committed
Code format
1 parent 778b6c2 commit 314e863

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

app/src/main/java/com/mardillu/openai/test/App.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import com.mardillu.openai.OpenAiInitializer
88
*
99
* @author mardillu
1010
*/
11-
class App : Application(){
11+
class App : Application() {
1212
override fun onCreate() {
1313
super.onCreate()
1414
OpenAiInitializer.initialize(getString(R.string.OPEN_AI_API_KEY))

app/src/main/java/com/mardillu/openai/test/MainActivity.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import com.mardillu.openai.test.databinding.ActivityMainBinding
1111
import java.io.File
1212

1313
class MainActivity : AppCompatActivity() {
14+
1415
private lateinit var binding: ActivityMainBinding
16+
1517
override fun onCreate(savedInstanceState: Bundle?) {
1618
super.onCreate(savedInstanceState)
1719
binding = ActivityMainBinding.inflate(layoutInflater)
@@ -83,7 +85,11 @@ class MainActivity : AppCompatActivity() {
8385
}
8486
}
8587

86-
chatGptService.createImageEdit(imageFromAssets("img.png"), "A cute cat sitting on a white table", imageFromAssets("img.png")) { result, error ->
88+
chatGptService.createImageEdit(
89+
imageFromAssets("img.png"),
90+
"A cute cat sitting on a white table",
91+
imageFromAssets("img.png")
92+
) { result, error ->
8793
if (error != null) {
8894
// Handle error
8995
} else if (result != null) {
@@ -121,7 +127,7 @@ class MainActivity : AppCompatActivity() {
121127
private fun imageFromAssets(name: String): File {
122128
val inputStream = applicationContext.assets.open(name)
123129
val suf = if (name.contains("m4a")) "suf.m4a" else "suf"
124-
val file = File.createTempFile("pre",suf)
130+
val file = File.createTempFile("pre", suf)
125131
file.outputStream().use { outputStream ->
126132
inputStream.copyTo(outputStream)
127133
}

0 commit comments

Comments
 (0)