-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from llm-tools/loaders
Introduce stores (replaces caches)
- Loading branch information
Showing
57 changed files
with
1,676 additions
and
954 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { BaseLoader } from './interfaces/base-loader.js'; | ||
import { BaseDb } from './interfaces/base-db.js'; | ||
import { BaseVectorDatabase } from './interfaces/base-vector-database.js'; | ||
import { BaseEmbeddings } from './interfaces/base-embeddings.js'; | ||
import { BaseCache } from './interfaces/base-cache.js'; | ||
import { BaseStore } from './interfaces/base-store.js'; | ||
import { BaseModel } from './interfaces/base-model.js'; | ||
|
||
export * from './types.js'; | ||
export * from './constants.js'; | ||
export { BaseDb, BaseCache, BaseLoader, BaseEmbeddings, BaseModel }; | ||
export { BaseStore, BaseVectorDatabase, BaseLoader, BaseEmbeddings, BaseModel }; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Conversation, LoaderListEntry, Message } from '../types.js'; | ||
|
||
export interface BaseStore { | ||
init(): Promise<void>; | ||
|
||
addLoaderMetadata(loaderId: string, value: LoaderListEntry): Promise<void>; | ||
getLoaderMetadata(loaderId: string): Promise<LoaderListEntry>; | ||
hasLoaderMetadata(loaderId: string): Promise<boolean>; | ||
getAllLoaderMetadata(): Promise<LoaderListEntry[]>; | ||
|
||
loaderCustomSet<T extends Record<string, unknown>>(loaderId: string, key: string, value: T): Promise<void>; | ||
loaderCustomGet<T extends Record<string, unknown>>(key: string): Promise<T>; | ||
loaderCustomHas(key: string): Promise<boolean>; | ||
loaderCustomDelete(key: string): Promise<void>; | ||
deleteLoaderMetadataAndCustomValues(loaderId: string): Promise<void>; | ||
|
||
addConversation(conversationId: string): Promise<void>; | ||
getConversation(conversationId: string): Promise<Conversation>; | ||
hasConversation(conversationId: string): Promise<boolean>; | ||
deleteConversation(conversationId: string): Promise<void>; | ||
addEntryToConversation(conversationId: string, entry: Message): Promise<void>; | ||
clearConversations(): Promise<void>; | ||
} |
2 changes: 1 addition & 1 deletion
2
...edjs-interfaces/src/interfaces/base-db.ts → ...es/src/interfaces/base-vector-database.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.