mirror of
https://github.com/ollama/ollama.git
synced 2025-12-10 09:52:49 +01:00
embeddings: added cli command to embedding docs (#12993)
This commit is contained in:
@@ -13,9 +13,23 @@ Embeddings turn text into numeric vectors you can store in a vector database, se
|
|||||||
|
|
||||||
## Generate embeddings
|
## Generate embeddings
|
||||||
|
|
||||||
Use `/api/embed` with a single string.
|
|
||||||
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
|
<Tab title="CLI">
|
||||||
|
Generate embeddings directly from the command line:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
ollama run embeddinggemma "Hello world"
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also pipe text to generate embeddings:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
echo "Hello world" | ollama run embeddinggemma
|
||||||
|
```
|
||||||
|
|
||||||
|
Output is a JSON array.
|
||||||
|
|
||||||
|
</Tab>
|
||||||
<Tab title="cURL">
|
<Tab title="cURL">
|
||||||
```shell
|
```shell
|
||||||
curl -X POST http://localhost:11434/api/embed \
|
curl -X POST http://localhost:11434/api/embed \
|
||||||
|
|||||||
Reference in New Issue
Block a user