Describe the bug
I'm trying to use the chat completion HTTP endpoint of oobabooga's text-generation-webui instead of the text completion one. This gives this error message as the assistant's output in Home Assistant:
Sorry, there was a problem talking to the backend: 'text'
By the way, text completion works, but since there's no prompt template for Command R+ or Phi-3 and apparently also no proper stopping sequence defined, I need to use chat completion.
Expected behavior
Inference should work with chat completion like it does with text completion.
Logs
I see in ooba's textgen console that the correctly formatted prompt arrives. And I see it generating a response:
It seems to just not arrive back in the HA assistant.
I'm an AI engineer who got into HA because of AI integration, so not an expert with the HA parts yet, let me know if you need further information or how I could troubleshoot this myself. I'd also be happy to provide the prompts for the aforementioned models in a PR.
Update:
This was with the Generic OpenAl Compatible API. After switching to the text-generation-webui API, it works! Prompt and stopping works now.
It's up to you if we consider that a solution or if it's worth investigating why it doesn't work with the OpenAl API. But I'm happy to report it's working now and I can concentrate on the prompt engineering to make this work with HA and Command R+.
Yes that is the reason that text-generation-webui is split out in a different backend. It returns objects that have a different object type than what the OpenAI spec says.
Describe the bug
I'm trying to use the chat completion HTTP endpoint of oobabooga's text-generation-webui instead of the text completion one. This gives this error message as the assistant's output in Home Assistant:
By the way, text completion works, but since there's no prompt template for Command R+ or Phi-3 and apparently also no proper stopping sequence defined, I need to use chat completion.
Expected behavior
Inference should work with chat completion like it does with text completion.
Logs
I see in ooba's textgen console that the correctly formatted prompt arrives. And I see it generating a response:
It seems to just not arrive back in the HA assistant.
I'm an AI engineer who got into HA because of AI integration, so not an expert with the HA parts yet, let me know if you need further information or how I could troubleshoot this myself. I'd also be happy to provide the prompts for the aforementioned models in a PR.
Update: This was with the Generic OpenAl Compatible API. After switching to the text-generation-webui API, it works! Prompt and stopping works now.
It's up to you if we consider that a solution or if it's worth investigating why it doesn't work with the OpenAl API. But I'm happy to report it's working now and I can concentrate on the prompt engineering to make this work with HA and Command R+.