Releases: sitehostnz/sthai-php
Releases · sitehostnz/sthai-php
Release list
v1.2.0
- Breaking:
embed()andbatchEmbed()now return the fullEmbeddingResponseinstead of bare vectors. Get the vectors viaoutput()(one per input, sooutput()[0]forembed()), and token usage viausage()- previously usage on embedding calls was unrecoverable. - Breaking:
rerank()now returns the fullRerankResponseinstead of aRerankResult[]array. Get the sorted results viaoutput()(or the$resultsproperty), and token usage viausage(). - Breaking:
EmbeddingResponse::output()now returns validated float vectors and throwsSthAI\Exception\ResponseExceptionfor non-float encoding formats or when the response carries no embeddings. The raw entries stay available on the$dataproperty.
What's Changed
Full Changelog: v1.1.1...v1.2.0
v1.1.1
Added
- A fuller error hierarchy matching the Python client:
InputException(renamed fromInvalidArgumentException),TransportException,ResponseException(withResponseParseExceptionas a subclass), andApiStatusExceptionwithClientException(4xx) andApiException(5xx). CatchingSthAI\Exception\SthAIExceptionstill handles everything the client can throw. - HTTP error responses now parse the server's
{"error": {"message": ..., "type": ...}}body:ClientExceptionandApiExceptioncarrygetStatusCode(),getResponseBody(),getServerMessage()andgetErrorType().
What's Changed
Full Changelog: v1.1.0...v1.1.1
v1.1.0
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
Full Changelog: v1.0.0...v1.1.0
v1.0.0
v0.1.0
Initial pre-release for packaging
Full Changelog: https://github.com/ftsartek/sthai-php/commits/v0.1.0