Description
Bug Report
Product: chatGPTbox
Component: Custom Model
Version: [2.4.6]
Description
An error occurs when using a custom model in chatGPTbox, causing unexpected behavior and hindering the user's ability to interact with the model effectively. The error message "Unexpected token 'O', "{"":OPENROUTER"... is not valid JSON for openrouter API completions" indicates that there is an issue with the JSON data being processed by the custom model.
Steps to Reproduce
- Load a custom model into chatGPTbox
- Attempt to use the custom model for text generation or completion tasks
- Observe the error message "Unexpected token 'O', "{"":OPENROUTER"... is not valid JSON for openrouter API completions"
Expected Behavior
The custom model should be able to process JSON data without errors and function as intended for text generation or completion tasks.
Actual Behavior
The custom model encounters an error while processing JSON data, causing unexpected behavior and preventing it from functioning correctly.
Impact
This bug significantly impacts the user experience by preventing the use of custom models in chatGPTbox. Users are unable to leverage their custom models for text generation or completion tasks due to the error.
Severity
High
Priority
High
Proposed Solution
Investigate the root cause of the error and implement a fix that ensures custom models can process JSON data without encountering errors. Additionally, consider adding stricter JSON validation checks to prevent invalid data from being input into the custom model.
Additional Notes
The error message "Unexpected token 'O', "{"":OPENROUTER"... is not valid JSON for openrouter API completions" suggests that the custom model might be attempting to parse data intended for the OpenRouter API. It would be beneficial to identify the source of this data and ensure it is properly handled to prevent conflicts with the custom model.
Please address this bug promptly to restore the functionality of custom models and enhance the user experience of chatGPTbox.