Add maximum prompt length configuration and exception

Created on 8 April 2024, 6 months ago
Updated 12 April 2024, 5 months ago

Problem/Motivation

It would be useful to configure maximum prompt length to prevent theoretical/accidental long prompts with high cost.

Steps to reproduce

Proposed resolution

  1. Add fieldset "Advanced/Other settings" at the end of the form.
  2. Add configuration to enter maximum token length
  3. Implement basic or advanced tokens calculation Calculate prompt token count Active
  4. In case maximum length is detected, throw aiprompt exception
  5. Catch exception and display error message on prompt configuration form.
  6. aiprompt implementing modules also can catch exception to display error during runtime.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇱🇹Lithuania mindaugasd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024