quivr/backend/modules/assistant/ito
Stan Girard 1931848262
feat(assistants): Add user usage update and pricing calculation to ITO assistant (#2433)
This pull request adds functionality to update user usage and calculate
pricing in the ITO assistant. It includes a new method
`increase_usage_user()` that raises an error if the user has consumed
all of their credits, and a new method `calculate_pricing()` that
returns a fixed pricing value of 20.

<!--
ELLIPSIS_HIDDEN
-->
----

| <a href="https://ellipsis.dev" target="_blank"><img
src="https://avatars.githubusercontent.com/u/80834858?s=400&u=31e596315b0d8f7465b3ee670f25cea677299c96&v=4"
alt="Ellipsis" width="30px" height="30px"/></a> | 🚀 This PR
description was created by [Ellipsis](https://www.ellipsis.dev) for
commit ee5fdf70f6. |
|--------|--------|

### Summary:
This PR adds functionality to update user usage and calculate pricing in
the ITO assistant, with new methods in the `ITO` class and an update to
where the `increase_usage_user()` method is called.

**Key points**:
- Added `increase_usage_user()` and `calculate_pricing()` methods to
`ITO` class in `/backend/modules/assistant/ito/ito.py`
- `increase_usage_user()` updates user usage and raises an error if all
credits are consumed
- `calculate_pricing()` returns a fixed pricing value of 20
- `increase_usage_user()` is now called in the `ITO` class constructor


----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)

<!--
ELLIPSIS_HIDDEN
-->
2024-04-16 09:14:38 -07:00
..
__init__.py feat: Add assistant module and remove ingestion module (#2420) 2024-04-10 04:28:22 -07:00
audio_transcript.py feat: Add tags to AssistantOutput classes (#2425) 2024-04-11 09:42:01 -07:00
crawler.py feat: Add tags to AssistantOutput classes (#2425) 2024-04-11 09:42:01 -07:00
difference.py feat: llamaparse & diff agent (#2427) 2024-04-12 09:06:50 -07:00
ito.py feat(assistants): Add user usage update and pricing calculation to ITO assistant (#2433) 2024-04-16 09:14:38 -07:00
summary.py feat(assistants): Add user usage update and pricing calculation to ITO assistant (#2433) 2024-04-16 09:14:38 -07:00