Re-organized functions and added semantic embeddings
This commit is contained in:
@@ -65,7 +65,7 @@ export class OpenAi extends LLMProvider {
|
||||
const controller = new AbortController();
|
||||
const response = new Promise<any>(async (res, rej) => {
|
||||
let history = this.fromStandard([...options.history || [], {role: 'user', content: message, timestamp: Date.now()}]);
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user