extended_openai_conversation icon indicating copy to clipboard operation
extended_openai_conversation copied to clipboard

convert the username

Open fantnhu opened this issue 1 year ago • 6 comments

Hi! I am glad that you can attach username in the chat. Unfortunately this is not possible for us, because our name contains Hungarian (European) characters (etc.: István Pintér) If I turn it on, I get the following error:

Sorry, I had a problem talking to OpenAI: 'Pintér István' does not match '^[a-zA-Z0-9_-]{1,64}$' - 'messages.1.name'

Is character encoding correct?

Thanks for your work! Happy New Year!

fantnhu avatar Dec 29 '23 07:12 fantnhu

Thanks for reporting an issue!

Currently, it uses friendly_name of person entity to attach. I might have to change it to something else such as user_id.

1

Any suggestions are welcome.

jekalmin avatar Dec 31 '23 07:12 jekalmin

@Teagan42 What's your thought? any ideas?

jekalmin avatar Dec 31 '23 15:12 jekalmin

How about using entity_id? since any logged user have their own person entity and we commonly use friendly_name and entity_id in exposed_entities, I think using entity_id can reduce the steps OpenAI should figure out who the speaker is. All entity_id is written in common Alphabet.

And If we use entity_id, we might connect speaker recognition function to room presence functionality in near future.

saya6k avatar Jan 01 '24 04:01 saya6k

@saya6k

That's a good idea. I worried that using user_id might make it hard to read for humans, but using entity_id will solve this problem! Thanks for your suggestion!

jekalmin avatar Jan 01 '24 10:01 jekalmin

Sorry, didn't see this thread. I think the user's id and a function to retrieve the user's detail would be a better solution than the one I had implemented.

Teagan42 avatar Jan 04 '24 00:01 Teagan42

No problem! If we use entity_id (such as person.xxxxxx), retrieving users' detail will be possible through get_attributes function.

jekalmin avatar Jan 04 '24 04:01 jekalmin

Sorry for being late, and it's released in 1.0.4. Please reopen the issue for further issues.

jekalmin avatar Nov 12 '24 13:11 jekalmin