Carter-py

Latest version: v1.0.2

Safety actively analyzes 623909 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

4.1

Changed

- `carter-js` now uses Carter's production API endpoints, which have been upgraded to the previously unstable API endpoints.

4.0

Changed

- `carter-js` now uses Carter's unstable API endpoints.
- `playerId` parameter has been renamed to userId in all functions. This is to reflect the change in the API.
- `carter.personalise` not takes a userId as its second argument. `personalise(text: string, userId: string, speak?: boolean | undefined)`.
- Other changes related to the api can be found in the carter docs, this changelog covers only the changes related to carter-js usage.

3.0

Changed

- `carter.history` now consists of only interactions, ordered by default with the newst first in the array. This simplified the type and still enables easy sorting and filtering where necessary, as the timestamp is now included in the interaction object.
- Wherever possible, properties have moved to being `null` when not present. This is both more semantically correct and allows for less errors when trying to access undefined properties.
- All carter interactions now contain an error message property `interaction.errorMessage`, which will be populated where appropriate and possible for better debugging.
- carter.registerSkill now takes a skill object as its only parameter. This object contains the skill name, action and options. See docs for details.

Interactions

- Now contain:
- `type` property, which is a string of the interaction type ie. "say", "opener" or "personalise"
- `isoTimestamp` property, which is an ISO string of the timestamp of the interaction
- `characterName` property, which is a string of the character name
- `url` property, which is a string of the url the request was sent to
- `forcedBehaviours` property, which is an array of triggered forced behaviours from carter. Not to be confused with `triggeredSkills` and `executedSkills`, which are carter-js skills created as a result of forced behaviours.
- All interactions are now of the same type and structure, legacy properties have been left in the object while they are still present in the api response, but will be removed in a future release.

2.2

Changed

- Default speak parameter is now false. This is to move carter-js inline with the API. If you want to use the audio url, you must now pass speak: true to the carter constructor, or when calling carter functions.

2.1

Added

- Optional `speak` parameter when creating a carter object. This will determine whether or not carter returns an audio URL, which is currently slowing down response times
- Optional `speak` parameter to all interaction functions. This allows you to override the default class speak property. `opener` and `personalise` can also receive this parameter, but the audio url is not currently supported by the API for these functions, so related properties in the interaction will remain undefined.
- All interactions now have a `response_text` property, which extracts the response text from the API response. This is to streamline getting your output, but also allows me to adapt carter-js to the API changes in the future. **Using this property to extract your output is strongly recommended as it will always work, regardless of API changes.**
- `say` now has a `response_audio` parameter which extracts the audio URL from the API response. See `response_text`. `opener` and `personalise` also have this property, but it will always be undefined as the API does not currently support audio for these functions. Another minor update will be released with this functionality when available. **Using this property to extract your audio is strongly recommended as it will always work, regardless of API changes.**

Changed

- Small type changes to accommodate the above additions.

Fixed

- None

Deprecated

- None

2.0.2

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.