Combine the append and append_submit methods, and add an optional
parameter to append to indicate whether it is a submission.
Add a docstring to append.
- Rename the context menu's "visibility-condition" to "enabled-on". Old
name didn't make a lot of sense considering it was always visible.
- Add context menu stuff to wi images
- Add big image viewer and link context menu to it
- Strip url of trailing slashes, this caused issues when your api url
ended with a slash (such as the default! at least i think)
- Notify the user if they didn't call sd webui with the --api argument,
which is required to use the api
- Don't try to write to non-existant art directory, just send b64 image
like the diffusers function does it. In the future we probably want to
save these, but it would be in standardized manner most likely tied to
story files somehow
The method lua_compute_context no longer ignores its arguments.
This restores support for overriding the submitted text and
allowed WI entries and folders to lua_compute_context.
Add optional allowed_wi_entries and allowed_wi_folders parameters to
calc_ai_text. These allow restricting which WI is added to the
context. The default is no restriction.
Fix an issue in which streaming tokens were returned by calc_ai_text.
This fixes an issue in which lua_compute_context would receive
streamed tokens (only if token streaming was turned on).
Add docstrings to calc_ai_text and to_sentences.
Improve the regular expression used to split actions by sentence.
The new regular expression allows quotation marks after punctuation
to be attached to the sentence.
Improve the interaction between AN and WI depth and actions split
by sentence. The author's note was added after the sentence
that pushed the action count up to or greater than the depth.
This included "empty" actions from undoing actions, as well as
continuation actions. As a result, the author's note text
was often inserted at the end of the context, which often prevented
the model from generating coherent continuation text.
Consider sentence count in addition to action count for AN and WI depth.
Ignore completely empty actions when determining AN and WI depth.
Insert AN text before the sentence that crosses the AN depth, instead of
after the sentence. This means that at least one sentence from the
action alwasy appears at the end of the context, which gives the AI
something to continue from.
A few extremely minor optimizations from reducing redundant work.
Pre-compile the sentence splitting regular expression.
Don't join action sentences multiple times just to compute their
length.
Fix a few typos and remove some commented out code.