gpt-3.5-turbo-0125 as ModelNames::TURBO_0125gpt-4-turbo-preview as ModelNames::GPT4_TURBOgpt-4-0125-preview as ModelNames::GPT4_TURBO_0125gpt-4-1106-preview as ModelNames::GPT4_TURBO_1106ModelNames::TURBO_0613 due to deprecation (gpt-3.5-turbo-0613)ModelNames::TURBO_16K_0613 due to deprecation (gpt-3.5-turbo-16k-0613)Full Changelog: https://github.com/HelgeSverre/receipt-scanner/compare/v3.0.0...v3.1.0
model parameter on the scan()method now accepts a string instead of the (now removed) enum Model.To upgrade to v3, you need to search-and-replace for all instances in your code that references the Model enum and
change it to the new ModelNames::NAME_HERE class constant, OR simply refer to the model name as a string.
This change was done because at best there was no benefit from using an enum in this case, and at worst it would prevent you from specifying a model that was not explicitly listed in the enum, which is a silly restriction to have.
The new ModelNames class constants are as follows:
ModelNames Constant |
Value |
|---|---|
ModelNames::TURBO |
gpt-3.5-turbo |
ModelNames::TURBO_INSTRUCT |
gpt-3.5-turbo-instruct |
ModelNames::TURBO_1106 |
gpt-3.5-turbo-1106 |
ModelNames::TURBO_16K |
gpt-3.5-turbo-16k |
ModelNames::TURBO_0613 |
gpt-3.5-turbo-0613 |
ModelNames::TURBO_16K_0613 |
gpt-3.5-turbo-16k-0613 |
ModelNames::TURBO_0301 |
gpt-3.5-turbo-0301 |
ModelNames::GPT4 |
gpt-4 |
ModelNames::GPT4_32K |
gpt-4-32k |
ModelNames::GPT4_32K_0613 |
gpt-4-32k-0613 |
ModelNames::GPT4_1106_PREVIEW |
gpt-4-1106-preview |
ModelNames::GPT4_0314 |
gpt-4-0314 |
ModelNames::GPT4_32K_0314 |
gpt-4-32k-0314 |
In the previous version, you might have used the Model enum like this:
use HelgeSverre\ReceiptScanner\Enums\Model;
// Example usage in v2
$result = $receiptScanner->scan($inputText, Model::TURBO_INSTRUCT);
In the new version, replace the Model enum with ModelNames::NAME_HERE constant or a direct string. Here are two ways
to do it:
Using ModelNames Constant:
use HelgeSverre\ReceiptScanner\ModelNames;
$result = $receiptScanner->scan($inputText, ModelNames::TURBO_INSTRUCT);
Using String Directly:
$result = $receiptScanner->scan($inputText, 'gpt-3.5-turbo-instruct');
Full Changelog: https://github.com/HelgeSverre/receipt-scanner/compare/v2.0.1...v3.0.0
Added: Added RTF text loader using this package.
Full Changelog: https://github.com/HelgeSverre/receipt-scanner/compare/v2.0.0...v2.0.1
Rewrote some parts of the package, the API has changed, therefore bumping to v2.
Full Changelog: https://github.com/HelgeSverre/receipt-scanner/compare/v1.0.3...v2.0.0
Broken filesystem config for textract.
Full Changelog: https://github.com/HelgeSverre/receipt-scanner/compare/v1.0.2...v1.0.3
How can I help you explore Laravel packages today?