Re-organized functions and added semantic embeddings
All checks were successful
Publish Library / Build NPM Project (push) Successful in 46s
Publish Library / Tag Version (push) Successful in 8s

This commit is contained in:
2025-12-19 11:16:05 -05:00
parent c896b585d0
commit 435c6127b1
9 changed files with 987 additions and 123 deletions

View File

@@ -53,7 +53,7 @@ export class Anthropic extends LLMProvider {
const response = new Promise<any>(async (res, rej) => {
let history = this.fromStandard([...options.history || [], {role: 'user', content: message, timestamp: Date.now()}]);
const original = deepCopy(history);
if(options.compress) history = await this.ai.llm.compress(<any>history, options.compress.max, options.compress.min, options);
if(options.compress) history = await this.ai.language.compressHistory(<any>history, options.compress.max, options.compress.min, options);
const requestParams: any = {
model: options.model || this.model,
max_tokens: options.max_tokens || this.ai.options.max_tokens || 4096,