EmbeddingsResponse
class EmbeddingsResponse implements Arrayable, Countable, IteratorAggregate, JsonSerializable
Traits
Properties
| Response|null | $raw | The raw HTTP response, if available for the provider. |
from HasRawResponse |
Methods
Prepare the instance for serialization, discarding the unserializable raw HTTP response.
Get the first set of embeddings in the response.
Get the instance as an array.
Get the JSON serializable representation of the instance.
Get the number of generated embeddings in the response.
Get an iterator for the object.
Details
in
HasRawResponse at line 19
HasRawResponse
withRawResponse(Response|null $response)
Set the raw HTTP response.
in
HasRawResponse at line 29
array
__serialize()
Prepare the instance for serialization, discarding the unserializable raw HTTP response.
at line 25
__construct(array $embeddings, Usage $usage, Meta $meta)
Create a new embeddings response instance.
at line 34
array
first()
Get the first set of embeddings in the response.
at line 42
array
toArray()
Get the instance as an array.
at line 54
array
jsonSerialize()
Get the JSON serializable representation of the instance.
at line 62
int
count()
Get the number of generated embeddings in the response.
at line 72
Traversable
getIterator()
Get an iterator for the object.