|
3701 | 3701 | }
|
3702 | 3702 | // token counts for an
|
3703 | 3703 | useEffect(() => {
|
3704 |
| - const order = ["prefix","text","suffix"] |
| 3704 | + const order = ["prefix","text","suffix"] |
3705 | 3705 | const assembled = authorNoteTokens.text && authorNoteTokens.text !== ""
|
3706 | 3706 | ? order.map(key => authorNoteTokens[key]).join("")
|
3707 | 3707 | : "";
|
|
3727 | 3727 | } catch (e) {
|
3728 | 3728 | if (e.name !== 'AbortError'){
|
3729 | 3729 | reportError(e);
|
3730 |
| - setAuthorNoteTokens((prevauthorNoteTokens) => ({ ...prevauthorNoteTokens, "tokens": 0 })) |
| 3730 | + setAuthorNoteTokens((prevauthorNoteTokens) => ({ ...prevauthorNoteTokens, "tokens": 0 })) |
3731 | 3731 | }
|
3732 | 3732 | }
|
3733 | 3733 | }, 500);
|
|
3741 | 3741 | }
|
3742 | 3742 | // token counts for memory
|
3743 | 3743 | useEffect(() => {
|
3744 |
| - const order = ["prefix","text","suffix"] |
| 3744 | + const order = ["prefix","text","suffix"] |
3745 | 3745 | const assembled = memoryTokens.text && memoryTokens.text !== ""
|
3746 | 3746 | ? order.map(key => memoryTokens[key]).join("")
|
3747 | 3747 | : "";
|
|
3768 | 3768 | } catch (e) {
|
3769 | 3769 | if (e.name !== 'AbortError'){
|
3770 | 3770 | reportError(e);
|
3771 |
| - setMemoryTokens((prevMemoryTokens) => ({ ...prevMemoryTokens, "tokens": 0 })); |
| 3771 | + setMemoryTokens((prevMemoryTokens) => ({ ...prevMemoryTokens, "tokens": 0 })); |
3772 | 3772 | }
|
3773 | 3773 | }
|
3774 | 3774 | }, 500);
|
|
3778 | 3778 | },[modalState["context"],memoryTokens.text,memoryTokens.prefix,memoryTokens.suffix,cancel,endpoint,endpointAPI])
|
3779 | 3779 | // token counts for wi
|
3780 | 3780 | useEffect(() => {
|
3781 |
| - const assembled = memoryTokens.worldInfo && memoryTokens.worldInfo !== "" |
| 3781 | + const assembled = memoryTokens.worldInfo && memoryTokens.worldInfo !== "" |
3782 | 3782 | ? [worldInfo.prefix,memoryTokens.worldInfo,worldInfo.suffix].join("")
|
3783 | 3783 | : "";
|
3784 | 3784 | if (assembled == "" || endpointAPI == 3){
|
|
3804 | 3804 | } catch (e) {
|
3805 | 3805 | if (e.name !== 'AbortError'){
|
3806 | 3806 | reportError(e);
|
3807 |
| - setMemoryTokens((prevMemoryTokens) => ({ ...prevMemoryTokens, "tokensWI": 0 })); |
| 3807 | + setMemoryTokens((prevMemoryTokens) => ({ ...prevMemoryTokens, "tokensWI": 0 })); |
3808 | 3808 | }
|
3809 | 3809 | }
|
3810 | 3810 | }, 500);
|
|
0 commit comments