Update chat.ts

pull/5536/head
Skylar Ray 2 months ago committed by Aniket
parent 0f6b971a7d
commit 66d1943ce6
  1. 6
      libs/remix-ai-core/src/prompts/chat.ts

@ -3,12 +3,12 @@ import { ChatEntry } from "../types/types"
export abstract class ChatHistory{
private static chatEntries:ChatEntry[] = []
static queuSize:number = 7 // change the queue size wrt the GPU size
static queueSize:number = 7 // change the queue size wrt the GPU size
public static pushHistory(prompt, result){
const chat:ChatEntry = [prompt, result]
this.chatEntries.push(chat)
if (this.chatEntries.length > this.queuSize){this.chatEntries.shift()}
if (this.chatEntries.length > this.queueSize){this.chatEntries.shift()}
}
public static getHistory(){
@ -18,4 +18,4 @@ export abstract class ChatHistory{
public static clearHistory(){
this.chatEntries = []
}
}
}

Loading…
Cancel
Save