There's no docs for all methods. #32
-
In my case, I'm trying to create embeddings but I can't find de proper parameters. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi there @cdiazr, You're right - we do not have currently detailed documentation on all of OpenAI's endpoints and functionality. Our suggestion is to look at OpenAI's embeddings guide for overall details on how embedding creation works, and the Embeddings API reference. You would then use the client's /** @var \Tectalic\OpenAi\Models\Embeddings\CreateResponse $response */
$response = $openaiClient->embeddings()->create(
new \Tectalic\OpenAi\Models\Embeddings\CreateRequest([
...
])
)->toModel(); Where Looking at https://github.com/tectalichq/public-openai-client-php/blob/main/src/Models/Embeddings/CreateRequest.php, the required properties are So something like: /** @var \Tectalic\OpenAi\Models\Embeddings\CreateResponse $response */
$response = $openaiClient->completions()->create(
new \Tectalic\OpenAi\Models\ Embeddings\CreateRequest([
'model' => 'text-embedding-ada-002',
'input' => 'Your input text',
])
)->toModel(); Hopefully that is enough to get you started. All the best, James |
Beta Was this translation helpful? Give feedback.
Hi there @cdiazr,
You're right - we do not have currently detailed documentation on all of OpenAI's endpoints and functionality.
Our suggestion is to look at OpenAI's embeddings guide for overall details on how embedding creation works, and the Embeddings API reference.
You would then use the client's
embeddings->create()
method, along with aTectalic\OpenAi\Models\Embeddings\ CreateRequest
model for the request. For example:Where
...
is an associative array of your Embeddings …