mirror of
https://github.com/james-m-jordan/openai-cookbook.git
synced 2025-05-09 19:32:38 +00:00
Encode separator for completions endpoint
`SEPARATOR` is being used to construct a prompt for use with the completions endpoint
This commit is contained in:
parent
420c818ba1
commit
b34607ddb7
@ -554,7 +554,7 @@
|
||||
"source": [
|
||||
"MAX_SECTION_LEN = 500\n",
|
||||
"SEPARATOR = \"\\n* \"\n",
|
||||
"ENCODING = \"cl100k_base\" # encoding for text-embedding-ada-002\n",
|
||||
"ENCODING = \"gpt2\" # encoding for text-davinci-003\n",
|
||||
"\n",
|
||||
"encoding = tiktoken.get_encoding(ENCODING)\n",
|
||||
"separator_len = len(encoding.encode(SEPARATOR))\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user