You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for providing a great examples. It is amazing indeed.
While I am deploying the test app for LLM chat, I tried two models which are Gemma and phi-2.
For Gemma, it worked perfectly. But for phi-2, I changed the code depending on your guide in comment
// `GemmaUiState()` is optimized for the Gemma model.// Replace `GemmaUiState` with `ChatUiState()` if you're using a different modelprivateval_uiState:MutableStateFlow<ChatUiState> =MutableStateFlow(ChatUiState())
When I changed the code like above, error happens in the below part.
try {
val fullPrompt =_uiState.value.fullPrompt
inferenceModel.generateResponseAsync(fullPrompt)
inferenceModel.partialResults
.collectIndexed { index, (partialResult, done) ->
currentMessageId?.let {
if (index ==0) {
_uiState.value.appendFirstMessage(it, partialResult) // <-- this is the error part
} else {
_uiState.value.appendMessage(it, partialResult, done)
}
if (done) {
currentMessageId =null// Re-enable text input
setInputEnabled(true)
}
}
}
} catch (e:Exception) {
_uiState.value.addMessage(e.localizedMessage ?:"Unknown Error", MODEL_PREFIX)
setInputEnabled(true)
}
The error message is
Unresolved reference: appendFirstMessage
can you give me a feedback for this issue?
Thanks!
The text was updated successfully, but these errors were encountered:
mhyeonsoo
changed the title
_uiState function error
LLM example --> Phi-2 model implementation: _uiState function error
Mar 13, 2024
Hi, thanks for providing a great examples. It is amazing indeed.
While I am deploying the test app for LLM chat, I tried two models which are Gemma and phi-2.
For Gemma, it worked perfectly. But for phi-2, I changed the code depending on your guide in comment
When I changed the code like above, error happens in the below part.
The error message is
can you give me a feedback for this issue?
Thanks!
The text was updated successfully, but these errors were encountered: