(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 is a website building & hosting documentation for Clojure/Script libraries
× close