KoboldAI-Client icon indicating copy to clipboard operation
KoboldAI-Client copied to clipboard

Inferkit prompt not defined, InferKit API Error: 500

Open DustOfWinter opened this issue 3 years ago • 4 comments

The inferkit integration seems to be broken. I get an error on line 877 of aiserver.py (prompt is referenced before assignment.) I tried moving the assignment from 858 to 841, and that sort of fixed it.

But now I'm getting "InferKit API Error: 500 - INVALID_INPUT"

DustOfWinter avatar May 30 '21 00:05 DustOfWinter

Hi, thanks for the report. I just pushed a bugfix to the Git that should resolve this, you should only need to update aiserver.py. Give it a shot and let me know if it works for you.

KoboldAI avatar May 30 '21 00:05 KoboldAI

That fixed the prompt is undefined error, but the InferKit API Error: 500 is still happening. I think it has to do with having a large amount of world entries, or maybe world entries that are too long? I'm not seeing the error at all in a story using the exact same prompt/memory/author's note, but without world info.

DustOfWinter avatar May 30 '21 01:05 DustOfWinter

After messing around a little bit, I found that inferkit doesn't like submissions longer than 3000 characters. I made some tweaks to how the text is built and I think a better solution is to add the world info last, adding as many entries that fit in the remaining characters before the 3000 cap.

DustOfWinter avatar May 30 '21 03:05 DustOfWinter

Ah, I'm guessing I don't have a cap on the number of tokens/characters WI is allowed to inject, that would make sense. I'll look into adding it.

KoboldAI avatar May 30 '21 03:05 KoboldAI