Skip to content

Commit

Permalink
further simplify examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pkwarren committed Oct 18, 2023
1 parent aba7b5c commit 9ba17de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class ElizaChatActivity : AppCompatActivity() {
adapter.add(MessageData("...No response from Eliza...", true))
}
}
// This should only be called once.
adapter.add(
MessageData(
"Session has ended.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,8 @@ class Main {
// Add the message the user is sending to the views.
stream.send(converseRequest { sentence = "hello" })
stream.sendClose()
try {
for (streamResult in stream.responseChannel()) {
// Update the view with the response.
val elizaResponse = streamResult
println(elizaResponse.sentence)
}
} catch (e: ConnectException) {
for (response in stream.responseChannel()) {
println(response.sentence)
}
}
}
Expand Down

0 comments on commit 9ba17de

Please sign in to comment.