(create-embedding params)(create-embedding params options)Creates an embedding vector representing the input text.
Example:
(create-embedding {:model "text-embedding-ada-002"
:input "The food was delicious and the waiter..."})
Response:
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0.0023064255,
-0.009327292,
.... (1536 floats total for ada-002)
-0.0028842222,
],
"index": 0
}
],
"model": "text-embedding-ada-002",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}
Also see the OpenAI documentation
Creates an embedding vector representing the input text.
Example:
```
(create-embedding {:model "text-embedding-ada-002"
:input "The food was delicious and the waiter..."})
```
Response:
```
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [
0.0023064255,
-0.009327292,
.... (1536 floats total for ada-002)
-0.0028842222,
],
"index": 0
}
],
"model": "text-embedding-ada-002",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}
```
Also see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/embeddings/create)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |