Skip to content

v1.2.0

Latest

Choose a tag to compare

@ftsartek ftsartek released this 21 Jul 00:44
15cc059
  • Breaking: embed() and batchEmbed() now return the full EmbeddingResponse instead of bare vectors. Get the vectors via output() (one per input, so output()[0] for embed()), and token usage via usage() - previously usage on embedding calls was unrecoverable.
  • Breaking: rerank() now returns the full RerankResponse instead of a RerankResult[] array. Get the sorted results via output() (or the $results property), and token usage via usage().
  • Breaking: EmbeddingResponse::output() now returns validated float vectors and throws SthAI\Exception\ResponseException for non-float encoding formats or when the response carries no embeddings. The raw entries stay available on the $data property.

What's Changed

  • feat!: return full response structs from embed, batchEmbed and rerank by @ftsartek in #4

Full Changelog: v1.1.1...v1.2.0