Skip to content

Commit 87a7223

Browse files
authored
Update README.md
1 parent 07e4f39 commit 87a7223

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ Postgres extension that does input tokenization using OpenAI's tiktoken.
55
## Usage
66

77
```sql
8-
pg_tiktoken=# create extension pg_tiktoken;
8+
db=> create extension pg_tiktoken;
99
CREATE EXTENSION
10-
pg_tiktoken=# select tiktoken_count('p50k_edit', 'A long time ago in a galaxy far, far away');
10+
db=> select tiktoken_count('p50k_edit', 'A long time ago in a galaxy far, far away');
1111
tiktoken_count
1212
----------------
1313
11
1414
(1 row)
1515

16-
pg_tiktoken=# select tiktoken_encode('cl100k_base', 'A long time ago in a galaxy far, far away');
16+
db=> select tiktoken_encode('cl100k_base', 'A long time ago in a galaxy far, far away');
1717
tiktoken_encode
1818
----------------------------------------------------
1919
{32,1317,892,4227,304,264,34261,3117,11,3117,3201}
@@ -30,14 +30,14 @@ pg_tiktoken=# select tiktoken_encode('cl100k_base', 'A long time ago in a galaxy
3030
| `p50k_edit` | Use for edit models like `text-davinci-edit-001`, `code-davinci-edit-001` |
3131
| `r50k_base` (or `gpt2`) | GPT-3 models like `davinci` |
3232

33-
`tiktoken_count` and `tiktoken_encode` accept both encoding name and OpenAI model name as a first argument.
33+
`tiktoken_count` and `tiktoken_encode` functions accept both encoding name and OpenAI model name as a first argument.
3434

3535

3636
## Installation
3737

3838
Assuming that rust toolchain is already istalled:
3939

40-
```
40+
```sh
4141
# install pgx
4242
cargo install --locked cargo-pgx
4343
cargo pgx init
@@ -49,5 +49,5 @@ cargo pgx install
4949

5050
## Kudos
5151

52-
https://github.com/zurawiki/tiktoken-rs
53-
https://github.com/openai/tiktoken
52+
- https://github.com/zurawiki/tiktoken-rs
53+
- https://github.com/openai/tiktoken

0 commit comments

Comments
 (0)