This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Releases: tectalichq/public-openai-client-php
Releases · tectalichq/public-openai-client-php
1.6.0
Added
- Add support for OpenAI's new fine-tuning API, which allows fine-tuning of GPT 3.5 Turbo. Fine-tuning guide. Announcement.
- Add new
FineTuningJobsHandler, which creates and lists fine-tuning jobs. - Add new
FineTuningJobsEventsHandler, which gets status updates for a given fine-tuning job. - Add new
FineTuningJobsCancelHandler, which cancels an existing fine-tuning job. - Add support for new content moderation categories:
harassment/threatening,self-harm/intent,self-harm/instructions. Moderation guide.
Changed
- The
\Tectalic\OpenAi\Models\ChatCompletions\CreateRequestFunctionsItem::$parametersproperty is now required. - The
\Tectalic\OpenAi\Models\ChatCompletions\CreateRequestMessagesItem::$contentproperty is now required. - The
\Tectalic\OpenAi\Models\ChatCompletions\CreateRequestMessagesItemFunctionCallnameandargumentsproperties are now required. - The
\Tectalic\OpenAi\Models\ChatCompletions\CreateResponseChoicesItemindex,messageandfinish_reasonproperties are now required. - The
\Tectalic\OpenAi\Models\ChatCompletions\CreateResponseChoicesItemMessage::$contentproperty is now required. - The
\Tectalic\OpenAi\Models\ChatCompletions\CreateResponseChoicesItemMessageFunctionCallnameandargumentsproperties are now required. - The
\Tectalic\OpenAi\Models\Edits\CreateResponseChoicesItemtext,indexandfinish_reasonproperties are now required. - The
\Tectalic\OpenAi\Models\Edits\CreateResponseChoicesItem::$logprobsproperty has been removed. - The
\Tectalic\OpenAi\Models\Files\CreateResponse::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\Files\ListResponseDataItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\Files\RetrieveResponse::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\CreateResponseHyperparamsmodel structure is now defined, with the following required properties:n_epochs,batch_size,prompt_loss_weightandlearning_rate_multiplier. - The
\Tectalic\OpenAi\Models\FineTunes\CreateResponseResultFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\CreateResponseTrainingFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\CreateResponseValidationFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\ListResponseDataItemHyperparamsmodel structure is now defined, with the following required properties:n_epochs,batch_size,prompt_loss_weightandlearning_rate_multiplier. - The
\Tectalic\OpenAi\Models\FineTunes\ListResponseDataItemResultFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\ListResponseDataItemTrainingFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\ListResponseDataItemValidationFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\RetrieveResponseHyperparamsmodel structure is now defined, with the following required properties:n_epochs,batch_size,prompt_loss_weightandlearning_rate_multiplier. - The
\Tectalic\OpenAi\Models\FineTunes\RetrieveResponseResultFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\RetrieveResponseTrainingFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\RetrieveResponseValidationFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunes\RetrieveResponseValidationFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunesCancel\CancelFineTuneResponseHyperparamsmodel structure is now defined, with the following required properties:n_epochs,batch_size,prompt_loss_weightandlearning_rate_multiplier. - The
\Tectalic\OpenAi\Models\FineTunesCancel\CancelFineTuneResponseResultFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunesCancel\CancelFineTuneResponseTrainingFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\FineTunesCancel\CancelFineTuneResponseValidationFilesItem::$formatproperty is now required. - The
\Tectalic\OpenAi\Models\Moderations\CreateResponseResultsItemCategoriesmodel now supportsharassment/threatening,self-harm/intent,self-harm/instructionsinformation. - The
\Tectalic\OpenAi\Models\Moderations\CreateResponseResultsItemCategoryScoresmodel now supportsharassment/threatening,self-harm/intent,self-harm/instructionsinformation. - Improved documentation for many model properties.
- API version updated from 1.3.1 to 2.0.0.
Deprecated
- Deprecate the
EditsHandler. TheChatCompletionshandler should be used instead. These endpoints will be shut down on January 04, 2024. - Deprecate the
FineTunesHandler. The newFineTunesJobshandler should be used instead. These endpoints will be shut down on January 04, 2024. - Deprecate the
FineTunesEventsHandler. The newFineTunesJobsEventshandler should be used instead. These endpoints will be shut down on January 04, 2024. - Deprecate the
FineTunesCancelHandler. The newFineTunesJobsCancelhandler should be used instead. These endpoints will be shut down on January 04, 2024.
Full Changelog: v1.5.0...v1.6.0
v1.5.0
Added
- Add support for Function Calling in the chat completions handler. Function calling guide.
Changed
- Improve Examples in Readme.
- The
\Tectalic\OpenAi\Models\Completions\CreateRequest::$promptproperty is now required. - The
\Tectalic\OpenAi\Models\Completions\CreateResponseChoicesItem::$textproperty is now required. - The
\Tectalic\OpenAi\Models\Completions\CreateResponseChoicesItem::$indexproperty is now required. - The
\Tectalic\OpenAi\Models\Completions\CreateResponseChoicesItem::$logprobsproperty is now required. - The
\Tectalic\OpenAi\Models\Completions\CreateResponseChoicesItem::$finish_reasonproperty is now required. - The
\Tectalic\OpenAi\Models\ChatCompletions\CreateRequestMessagesItem::$contentproperty is no longer marked as required, as it is not required forfunctionchats but is for all other types. - Document the valid values for the
\Tectalic\OpenAi\Models\Completions\CreateResponseChoicesItem::$finish_reasonproperty. - Document the valid values for the
\Tectalic\OpenAi\Models\ChatCompletions\CreateResponseChoicesItem::$finish_reasonproperty. - API version updated from 1.2.0 to 1.3.1.
Full Changelog: v1.4.0...v1.5.0
1.4.0
Announcement Post
A ChatGPT API Client for Your PHP Applications
Added
- Add support for the new ChatGPT API, including
gpt-3.5-turbomodel and the new Chat completions endpoint. Chat completions guide. - Add support for the new Whisper API, allowing Transcriptions and Translations, accepting a variety of formats (
m4a,mp3,mp4,mpeg,mpga,wav,webm). Speech to text guide. - Add new
AudioTranscriptionsHandler, which transcribes audio into the input language text using the Whisper API. - Add new
AudioTranslationsHandler, which transcribes audio into english text using the Whisper API. - Add new
ChatCompletionsHandler, which creates a completion for one or more chat messages using the ChatGPT API.
Changed
- Clarify which models can be used in
\Tectalic\OpenAi\Models\Edits\CreateRequest::$modelwhen performing Edits. - Clarify that
\Tectalic\OpenAi\Models\Embeddings\CreateRequest:$inputcan be a maximum of 8192 tokens (not 2048 tokens). - Clarify that
\Tectalic\OpenAi\Models\ImagesEdits\CreateImageRequest::$maskis no longer a required field. - API version updated from 1.1.0 to 1.2.0.
Full Changelog: v1.3.1...v1.4.0
v1.3.1
Added
- Add support for PHPUnit v9.6.x and v10.x.
Changed
- Remove
idandmodelrequired properties from theTectalic\OpenAi\Models\Edits\CreateResponsemodel, as they are no longer returned by OpenAI's API. - Improve compatibility with the
php-http/discoverypackage v1.15.0 and newer. - Use Fully Qualified Class Names for Examples in Readme.
- Update Copyright year.
Fixed
- Fix
Response body parse failederror when retrieving a Model response from theEdits::create()handler and method. - Fix incorrect Error handling example in Readme.
Full Changelog: v1.3.0...v1.3.1
v1.3.0
Added
- Use parameters defined outside endpoint methods.
Changed
- Encourage the use of
php-http/mock-clientfor testing and mocking API responses. - Remove the
Tests\MockHttpClientclass, and use thephp-http/mock-clientpackage instead. - Make Handler and Model class names more readable.
Fixed
- Use correct model type for nested models.
v1.2.0
Added
- Add support for DALL·E image generations, edits and variations.
- Add new
ImageGenerationsHandler, which creates an image given a prompt. - Add new
ImagesEditsHandler, which creates an edited or extended image given an original image and a prompt. - Add new
ImagesVariationsHandler, which creates a variation of a given image.
Changed
- Improve Handler unit tests.
- API version updated from 1.0.6 to 1.1.0.
Full Changelog: v1.1.0...v1.2.0
1.1.0
Changed
- Improve readme.
Removed
- Remove deprecated
Answershandler and associated models. - Remove deprecated
Classificationshandler and associated models. - Remove deprecated
Engineshandler and associated models. - Remove deprecated
EnginesSearchhandler and associated models.
Full Changelog: v1.0.2...v1.1.0
1.0.2
1.0.1
Added
- Add support for Moderation using a new
Moderations::create()Handler class and Method. - Add usage information to response models:
Completions::create(),Edits::create()andEmbeddings::create().
Changed
- Define required properties for response models.
- Rename all nested response models.
- Change default value for
Tectalic\OpenAi\Models\FineTunes\CreateRequest::$prompt_loss_weight. - 22 API Methods are now supported, grouped into 14 API Handlers.
- API version updated from 1.0.5 to 1.0.6.
Fixed
- Don't run CI for tags.
- Use correct model type for nested models:
Tectalic\OpenAi\Models\FineTunes\CreateResponse,Tectalic\OpenAi\Models\FineTunes\RetrieveResponseandTectalic\OpenAi\Models\FineTunesCancel\CancelFineTuneResponse.
Full Changelog: v1.0.0...v1.0.1
1.0.0
- Initial release