feat(agent): Process feels decent now, however it can be very slow. This is a checkpoint to come back to. Going to start trying to make it faster.
This commit is contained in:
parent
72c2ddc3a0
commit
60d36ab8f4
27 changed files with 396 additions and 211 deletions
10
src/lib/utils/contentUtils.ts
Normal file
10
src/lib/utils/contentUtils.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Removes all content within <think>...</think> blocks
|
||||
* @param text The input text containing thinking blocks
|
||||
* @returns The text with all thinking blocks removed
|
||||
*/
|
||||
export const removeThinkingBlocks = (text: string): string => {
|
||||
// Use regex to identify and remove all <think>...</think> blocks
|
||||
// Using the 's' flag to make dot match newlines
|
||||
return text.replace(/<think>[\s\S]*?<\/think>/g, '').trim();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue