go-openai
go-openai copied to clipboard
add "name" property for ChatCompletionMessage
I found an undocumented possibility - for messages of the gpt-3.5 model, you can additionally specify the "name" property. This additional feature is useful for chats with multiple participants.
Found in the examples of the official library for python (Item No. 6 - Counting tokens for chat API calls): https://github.com/openai/openai-cookbook/blob/main/examples/How_to_count_tokens_with_tiktoken .ipynb
Nice find! Thank you for the PR 🙌
Could you please add a comment in code about that field being non-documented in the official docs?
Yes, no problem. Added 👌