Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "name" property for ChatCompletionMessage #123

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

fussraider
Copy link
Contributor

@fussraider fussraider commented Mar 4, 2023

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

@sashabaranov
Copy link
Owner

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?

@fussraider
Copy link
Contributor Author

Yes, no problem. Added 👌

@sashabaranov sashabaranov merged commit c5fe874 into sashabaranov:master Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants