Open nspitko opened 3 weeks ago
I don't use homellm but I had more luck with making multiple function calls. If I understand correctly you are using homeassistant
code block and have a corresponding function call template set? This is not how it currently works, judging by the code and my experience.
What it currently does is do a regex match and then run processing on every match. So it expects something like:
<functioncall> {json}
<functioncall> {json} <functioncall> {json}
These would call 3 functions. In my case, using qwen2.5, I just instructed it to output a single functioncall per line, and provided some examples and it does the job well. I had very reliable results with qwen2.5 7b Q6, but I had to switch to Q4 because otherwise I could not run LLM and Whisper on the same GPU at the same time. Q4 also does the job but makes mistakes occasionally.
Default regex should also be relaxed to allow for variable whitespace like this: <functioncall> *({[\S \t]*})
So I don't think this is a bug, you just misunderstood how it works and what it expects.
I know the bug report template says not to report issues where the AI gives a bad output, but I checked the training data for the "home" llm (I'm using a model trained on the same dataset) and it doesn't offer an array syntax here so I'm not sure what the expected format is.
Describe the bug
When asking the AI to perform multiple actions, the plugin will error out as it finds data past the first json blob.
Expected behavior
Plugin should continue parsing json until the end of the block, or models should be trained to encapsulate these in an array.
Logs