Encode separator for completions endpoint

`SEPARATOR` is being used to construct a prompt for use with the completions endpoint
pull/92/head
Robin Richtsfeld 1 year ago committed by GitHub
parent 420c818ba1
commit b34607ddb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save