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
I am not sure what the error details have no clue no idea but Have this error in my logs and there not response.
22:57:54.632 System.err SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
22:57:54.632 System.err SLF4J: Defaulting to no-operation (NOP) logger implementation
22:57:54.632 System.err SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
22:57:55.041 TrafficStats tagSocket(5) with statsTag=0xffffffff, statsUid=-1
22:57:56.772 System.out Failed to
Describe the issue briefly.
Hear is may code for reference since I have no idea what could be wrong what the error intells its the first time have encounter such and error and there isn't any relevant information on stackoverflaw
class RegenerativeModule(context: Context) {
private val sharedPreferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
private val appKey = sharedPreferences.getString("api_key", "")!!
private var vertexAI: VertexAI = VertexAI.Builder()
.setAccessToken(appKey)
.setProjectId("metospherus-kit")
.build()
var textRequest = vertexAI.textRequest()
.setModel("models/chat-bison-001")
.setTemperature(0.8)
.setMaxTokens(256)
.setTopK(40)
.setTopP(0.8)
}
Usage
searchableInputEditText.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE) {
println("message input $query")
CoroutineScope(Dispatchers.Main).launch {
RegenerativeModule(requireContext()).textRequest
.execute(query,object : VertexAI.Callback<Any> {
override fun onError(throwable: Throwable) {
println("Failed to ${throwable.message} ${throwable.localizedMessage}")
}
override fun onSuccess(result: Any) {
val messageContent = result.toString()
println("context $messageContent")
CoroutineScope(Dispatchers.Main).launch {
if (messageContent != null) {
val words = messageContent.split("\\s+".toRegex())
val typingDelay = 100L
val messageComp = GeneralBrainResponse(
GeneralBrain.generateRandomId(),
query,
messageContent
)
Constructor.insertOrUpdateUserCompanionShip(
messageComp,
appDatabase
)
val responseText = StringBuilder()
for (word in words) {
searchRecyclerView.hideSkeleton()
responseText.append(
"${
word.replace(".", ".\n\n")
.replace("?", "?\n\n")
.replace("*", "\n\n*")
.replace(".\n\n\n\n*", "\n\n*")
.replace("\n*", "*")
.replace(Regex("\\d\\."), "\n$0")
} "
)
val repos = mutableListOf(
GeneralSearchResults(
"Metospherus - Comprehensive Medical System",
responseText.toString().replace("\n\n ", "\n\n"),
)
)
searchAdapter.setData(repos)
delay(typingDelay)
}
}
}
}
}).let {
}
}
}
true
}
Steps to Reproduce
Build v1.1.0 as implementation in Kotlin not Kotlin Compose
Follow the code implementation and run then input message and submit
Nothing will happing in UI , but the logs will display that error
Description
I am not sure what the error details have no clue no idea but Have this error in my logs and there not response.
Describe the issue briefly.
Hear is may code for reference since I have no idea what could be wrong what the error intells its the first time have encounter such and error and there isn't any relevant information on stackoverflaw
Usage
Steps to Reproduce
Environment
Additional Info
Add any other relevant context here.
The text was updated successfully, but these errors were encountered: