Skip to content

Releases: sitehostnz/sthai-php

v1.2.0

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

v1.1.1

Choose a tag to compare

@ftsartek ftsartek released this 20 Jul 02:03
b23b582

Added

  • A fuller error hierarchy matching the Python client: InputException (renamed from InvalidArgumentException), TransportException, ResponseException (with ResponseParseException as a subclass), and ApiStatusException with ClientException (4xx) and ApiException (5xx). Catching SthAI\Exception\SthAIException still handles everything the client can throw.
  • HTTP error responses now parse the server's {"error": {"message": ..., "type": ...}} body: ClientException and ApiException carry getStatusCode(), getResponseBody(), getServerMessage() and getErrorType().

What's Changed

  • feat!: remap exceptions into a package-specific error hierarchy by @ftsartek in #3

Full Changelog: v1.1.0...v1.1.1

v1.1.0

Choose a tag to compare

@ftsartek ftsartek released this 19 Jul 22:30
b1a477a

v1.1.0

Added

  • Accessors for client state: sessionPin()/setSessionPin() and newSession() for reading, changing or regenerating the session pin after construction; history()/setHistory() for persisting and restoring conversations; and writeHistory()/setWriteHistory() for toggling history recording.
  • historyUsage() totalling token usage across the calls that built the stored history.

What's Changed

  • feat: accessors for session pin, chat history and history usage by @ftsartek in #2

Full Changelog: v1.0.0...v1.1.0

v1.0.0

Choose a tag to compare

@ftsartek ftsartek released this 19 Jul 20:46
6771177

Initial v1 release

What's Changed

  • chore: bump v1.0.0 for Packagist release by @ftsartek in #1

New Contributors

Full Changelog: v0.1.0...v1.0.0

v0.1.0

v0.1.0 Pre-release
Pre-release

Choose a tag to compare

@ftsartek ftsartek released this 18 Jul 10:11

Initial pre-release for packaging

Full Changelog: https://github.com/ftsartek/sthai-php/commits/v0.1.0