mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
The THONKening
This commit is contained in:
@ -986,6 +986,7 @@ export async function generateTextGenWithStreaming(generate_data, signal) {
|
||||
let logprobs = null;
|
||||
const swipes = [];
|
||||
const toolCalls = [];
|
||||
const state = {};
|
||||
while (true) {
|
||||
const { done, value } = await reader.read();
|
||||
if (done) return;
|
||||
@ -1004,7 +1005,7 @@ export async function generateTextGenWithStreaming(generate_data, signal) {
|
||||
logprobs = parseTextgenLogprobs(newText, data.choices?.[0]?.logprobs || data?.completion_probabilities);
|
||||
}
|
||||
|
||||
yield { text, swipes, logprobs, toolCalls };
|
||||
yield { text, swipes, logprobs, toolCalls, state };
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user