extended_openai_conversation
extended_openai_conversation copied to clipboard
user name (or function) with spaces fails
OpenAI does checks function parameters for ^[a-zA-Z0-9_-]{1,64}$. Unfortunately some integrations have spaces in their names. For examples, the Voice Over IP integration that can be used to talk directly to a HA Voice Assist via voip phones.
Error code: 400 - {'error': {'message': "'Voice over IP' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.1.name'", 'type': 'invalid_request_error', 'param': None, 'code': None}}
I have a patch https://github.com/jekalmin/extended_openai_conversation/pull/165 Validated that this fixes the issue and VoIP works nicely.
Thanks for reporting an issue.
As I commented in your PR, I was still concerning what to use in user's field because it has an issue when friendly_name
is not in English (see https://github.com/jekalmin/extended_openai_conversation/issues/63).
Probably using user_id(state_attr('person.xxx', 'user_id'
) is a reasonable option.
Closing the issue.