Skip to content

Add OpenAI GPT tokenizer class - #148

Merged
Adrian Bonar (adrianwyatt) merged 5 commits into
microsoft:mainfrom
dluc:dluc97-openaitokenizer
Mar 27, 2023
Merged

Add OpenAI GPT tokenizer class#148
Adrian Bonar (adrianwyatt) merged 5 commits into
microsoft:mainfrom
dluc:dluc97-openaitokenizer

Conversation

@dluc

Copy link
Copy Markdown
Contributor

Motivation and Context

Add GPT2/GPT3 tokenizer, to allow counting tokens when using OpenAI.

Description

Add C# port of the tokenizers recommended by OpenAI. See https://platform.openai.com/tokenizer for more info.

Comment thread dotnet/src/SemanticKernel/AI/OpenAI/Tokenizers/GPT3Tokenizer.cs Outdated
Comment thread dotnet/src/SemanticKernel/AI/OpenAI/Tokenizers/Settings/EmbeddedResource.cs Outdated
Comment thread dotnet/src/SemanticKernel/AI/OpenAI/Tokenizers/GPT3Tokenizer.cs
@dluc Devis Lucato (dluc) added PR: ready for review All feedback addressed, ready for reviews .NET Issue or Pull requests regarding .NET code labels Mar 24, 2023
@dluc Devis Lucato (dluc) added the PR: ready to merge PR has been approved by all reviewers, and is ready to merge. label Mar 27, 2023
@adrianwyatt
Adrian Bonar (adrianwyatt) enabled auto-merge (squash) March 27, 2023 22:41
@adrianwyatt
Adrian Bonar (adrianwyatt) merged commit 8f6dcb9 into microsoft:main Mar 27, 2023
Desmond Howard (dehoward) pushed a commit to lemillermicrosoft/semantic-kernel that referenced this pull request Jun 1, 2023
### Motivation and Context

Add GPT2/GPT3 tokenizer, to allow counting tokens when using OpenAI.

### Description

Add C# port of the tokenizers recommended by OpenAI. See
https://platform.openai.com/tokenizer for more info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NET Issue or Pull requests regarding .NET code PR: ready for review All feedback addressed, ready for reviews PR: ready to merge PR has been approved by all reviewers, and is ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants