Skip to content

Commit

Permalink
Link to article about generators
Browse files Browse the repository at this point in the history
!stable-docs
  • Loading branch information
simonw authored Nov 12, 2023
1 parent e9a6998 commit df7d248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/plugins/tutorial-model-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ To execute the model, we start with a word. We look at the options for words tha

Some words might not have any following words from our training sentence. For our implementation we wil fall back on picking a random word from our collection.

We will implement this as a [Python generator], using the yield keyword to produce each token:
We will implement this as a [Python generator](https://realpython.com/introduction-to-python-generators/), using the yield keyword to produce each token:
```python
def generate(transitions, length, start_word=None):
all_words = list(transitions.keys())
Expand Down Expand Up @@ -578,4 +578,4 @@ You may find that you are unable to uninstall the plugin using `llm uninstall ll
Should this happen, you can uninstall the plugin after first disabling it using the {ref}`LLM_LOAD_PLUGINS <llm-load-plugins>` environment variable like this:
```bash
LLM_LOAD_PLUGINS='' llm uninstall llm-markov
```
```

0 comments on commit df7d248

Please sign in to comment.