DenisovAV / flutter_gemma

The Flutter plugin allows running the Gemma AI model locally on a device from a Flutter application.
MIT License
55 stars 17 forks source link

Follow up Message Fails #27

Open JosephValle opened 3 weeks ago

JosephValle commented 3 weeks ago

When using the model: 2b-it-int8, you can't seem to get a second response, just crashes the app.

Xcode shows this error:

Thread 1: signal SIGABRT An abort signal terminated the process. Such crashes often happen because of an uncaught exception or unrecoverable error or calling the abort() function.

Tried with the example app with an asset load of it

And my own app with a network load. First message gets sent second throws that error in xcode

In Xcode:

func generateResponse(prompt: String) throws -> String {
        try session?.addQueryChunk(inputText: prompt)
        return try session?.generateResponse() ?? "" <-- seems to be called on that line
    }

my flutter code, it is only the 4th message. I send one to set the tone/usage prompt, one that's the user prompt, get a response, and then another user prompt and it breaks

Message example

DenisovAV commented 2 weeks ago

Thank you! Looks like I didn't check ios properly when updated to 0.4.0, will fix it soon

DenisovAV commented 3 days ago

Please try with 0.4.2