Skip to content

Commit

Permalink
Documentation for aliases for embedding models, closes #192
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Sep 4, 2023
1 parent 2e90a30 commit ee61cb0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docs/aliases.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Example output:
"3.5-16k": "gpt-3.5-turbo-16k",
"4": "gpt-4",
"gpt4": "gpt-4",
"4-32k": "gpt-4-32k"
"4-32k": "gpt-4-32k",
"ada": "ada-002"
}
```

Expand All @@ -60,6 +61,18 @@ Now you can run the `gpt-3.5-turbo-16k` model using the `turbo` alias like this:
```bash
llm -m turbo 'An epic Greek-style saga about a cheesecake that builds a SQL database from scratch'
```
Aliases can be set for both regular models and {ref}`embedding models <embeddings>` using the same command. To set an alias of `oai` for the OpenAI `ada-002` embedding model use this:
```bash
llm aliases set oai ada-002
```
Now you can embed a string using that model like so:
```bash
llm embed -c 'hello world' -m oai
```
Output:
```
[-0.014945968054234982, 0.0014304015785455704, ...]
```

## Removing an alias

Expand Down

0 comments on commit ee61cb0

Please sign in to comment.