Simplify tests with T.TempDir (#929)
This commit is contained in:
@@ -31,7 +31,7 @@ func setupAzureTestServer() (client *openai.Client, server *test.ServerTest, tea
|
||||
// This function approximates based on the rule of thumb stated by OpenAI:
|
||||
// https://beta.openai.com/tokenizer
|
||||
//
|
||||
// TODO: implement an actual tokenizer for GPT-3 and Codex (once available)
|
||||
// TODO: implement an actual tokenizer for GPT-3 and Codex (once available).
|
||||
func numTokens(s string) int {
|
||||
return int(float32(len(s)) / 4)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user