Make "Content" field in "ChatCompletionMessage" omitempty (#926)

This commit is contained in:
saileshd1402
2025-02-01 00:35:29 +05:30
committed by GitHub
parent 9823a8bbbd
commit 45aa99607b
3 changed files with 5 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ func setupAzureTestServer() (client *openai.Client, server *test.ServerTest, tea
// numTokens Returns the number of GPT-3 encoded tokens in the given text.
// This function approximates based on the rule of thumb stated by OpenAI:
// https://beta.openai.com/tokenizer
// https://beta.openai.com/tokenizer/
//
// TODO: implement an actual tokenizer for GPT-3 and Codex (once available).
func numTokens(s string) int {