class EmbeddingsResponse implements Arrayable, Countable, IteratorAggregate, JsonSerializable

Traits

Properties

Response|null $raw

The raw HTTP response, if available for the provider.

from  HasRawResponse

Methods

withRawResponse(Response|null $response)

Set the raw HTTP response.

array
__serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

__construct(array $embeddings, Usage $usage, Meta $meta)

Create a new embeddings response instance.

array
first()

Get the first set of embeddings in the response.

array
toArray()

Get the instance as an array.

array
jsonSerialize()

Get the JSON serializable representation of the instance.

int
count()

Get the number of generated embeddings in the response.

getIterator()

Get an iterator for the object.

Details

in HasRawResponse at line 19
HasRawResponse withRawResponse(Response|null $response)

Set the raw HTTP response.

Parameters

Response|null $response

Return Value

HasRawResponse

in HasRawResponse at line 29
array __serialize()

Prepare the instance for serialization, discarding the unserializable raw HTTP response.

Return Value

array

at line 25
__construct(array $embeddings, Usage $usage, Meta $meta)

Create a new embeddings response instance.

Parameters

array $embeddings
Usage $usage
Meta $meta

at line 34
array first()

Get the first set of embeddings in the response.

Return Value

array

at line 42
array toArray()

Get the instance as an array.

Return Value

array

at line 54
array jsonSerialize()

Get the JSON serializable representation of the instance.

Return Value

array

at line 62
int count()

Get the number of generated embeddings in the response.

Return Value

int

at line 72
Traversable getIterator()

Get an iterator for the object.

Return Value

Traversable