@llamaindex/core
Advanced tools
Comparing version 0.4.7 to 0.4.8
@@ -38,3 +38,3 @@ import { ChatMessage, LLM } from '../../llms/dist/index.js'; | ||
protected constructor(chatStore?: BaseChatStore<AdditionalMessageOptions>, chatStoreKey?: string); | ||
getAllMessages(): ChatMessage<AdditionalMessageOptions>[]; | ||
getAllMessages(): ChatMessage<AdditionalMessageOptions>[] | Promise<ChatMessage<AdditionalMessageOptions>[]>; | ||
put(messages: ChatMessage<AdditionalMessageOptions>): void; | ||
@@ -55,3 +55,3 @@ set(messages: ChatMessage<AdditionalMessageOptions>[]): void; | ||
constructor(options?: Partial<ChatMemoryBufferOptions<AdditionalMessageOptions>>); | ||
getMessages(transientMessages?: ChatMessage<AdditionalMessageOptions>[] | undefined, initialTokenCount?: number): ChatMessage<AdditionalMessageOptions>[]; | ||
getMessages(transientMessages?: ChatMessage<AdditionalMessageOptions>[] | undefined, initialTokenCount?: number): Promise<ChatMessage<AdditionalMessageOptions>[]>; | ||
} | ||
@@ -58,0 +58,0 @@ |
@@ -49,4 +49,4 @@ import { Settings } from '../../global/dist/index.js'; | ||
} | ||
getMessages(transientMessages, initialTokenCount = 0) { | ||
const messages = this.getAllMessages(); | ||
async getMessages(transientMessages, initialTokenCount = 0) { | ||
const messages = await this.getAllMessages(); | ||
if (initialTokenCount > this.tokenLimit) { | ||
@@ -53,0 +53,0 @@ throw new Error("Initial token count exceeds token limit"); |
{ | ||
"name": "@llamaindex/core", | ||
"type": "module", | ||
"version": "0.4.7", | ||
"version": "0.4.8", | ||
"description": "LlamaIndex Core Module", | ||
@@ -6,0 +6,0 @@ "exports": { |
@@ -5,3 +5,3 @@ import { ChatMessage } from '../../../llms/dist/index.js'; | ||
abstract setMessages(key: string, messages: ChatMessage<AdditionalMessageOptions>[]): void; | ||
abstract getMessages(key: string): ChatMessage<AdditionalMessageOptions>[]; | ||
abstract getMessages(key: string): ChatMessage<AdditionalMessageOptions>[] | Promise<ChatMessage<AdditionalMessageOptions>[]>; | ||
abstract addMessage(key: string, message: ChatMessage<AdditionalMessageOptions>, idx?: number): void; | ||
@@ -8,0 +8,0 @@ abstract deleteMessages(key: string): void; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
715610