Skip to content

Commit

Permalink
Fix typos (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
omahs authored Aug 30, 2024
1 parent b47c9ba commit 1ce5258
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prompt functions

The `template` decorator takes a function as an argument whose docstring is a Jinja template, and return a `Template` object:
The `template` decorator takes a function as an argument whose docstring is a Jinja template, and returns a `Template` object:

```python
from prompts import template
Expand All @@ -21,7 +21,7 @@ def few_shots(instructions, examples, question):
A: """
```

Caling the `Template` object renders the Jinja template:
Calling the `Template` object renders the Jinja template:

```python
instructions = "Please answer the following question following the examples" examples = [
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/special_tokens.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Handle special tokens

Tokens that indicate the beginnning of a sequence, an end of sequence, that
Tokens that indicate the beginning of a sequence, an end of sequence, that
delineate user and assistant turns in a conversation, etc. are model-specific.
This means that one needs to write a new prompt each time they use a new model,
only replacing these special tokens. This is error-prone and leads to duplicated
Expand All @@ -9,7 +9,7 @@ work.

## Beginning and end of sequences

`prompts` provides special variables in its templates that allows user to use special tokens in their prompts in a model-agnotic way:
`prompts` provides special variables in its templates that allows user to use special tokens in their prompts in a model-agnostic way:

```python
import prompts
Expand Down Expand Up @@ -49,4 +49,4 @@ def simple_prompt(favorite: str):
"""
```

Chat templates are so idiosyncractic, however, that we recommend using the `Chat` class to format according to chat templates.
Chat templates are so idiosyncratic, however, that we recommend using the `Chat` class to format according to chat templates.

0 comments on commit 1ce5258

Please sign in to comment.