Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Failure of ChatCompletionExample #50

Unanswered
BluePasta23 asked this question in Q&A
Discussion options

Hi together, the Kotlin ChatCompletion Example fails on me with the following error - anybody with a similar problem?

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.chatapitest/com.example.chatapitest.MainActivity}: android.os.NetworkOnMainThreadException

at com.cjcrafter.openai.OpenAIImpl.executeRequest(OpenAIImpl.kt:36)
at com.cjcrafter.openai.OpenAIImpl.createChatCompletion(OpenAIImpl.kt:123)
at com.example.chatapitest.MainActivityKt.testfun(MainActivity.kt:50)

You must be logged in to vote

Replies: 1 comment

Comment options

Trimming stack traces really hurts people's ability to help you. Full logs are always preferred, especially when developers are involved.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /