-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(minor): reference common classes on the
Llama
instance (#360)
- Loading branch information
Showing
4 changed files
with
34 additions
and
1 deletion.
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
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,22 @@ | ||
import {LlamaChatSession} from "../evaluator/LlamaChatSession/LlamaChatSession.js"; | ||
import {LlamaChat} from "../evaluator/LlamaChat/LlamaChat.js"; | ||
import {LlamaCompletion} from "../evaluator/LlamaCompletion.js"; | ||
|
||
export type LlamaClasses = { | ||
readonly LlamaChatSession: typeof LlamaChatSession, | ||
readonly LlamaChat: typeof LlamaChat, | ||
readonly LlamaCompletion: typeof LlamaCompletion | ||
}; | ||
|
||
let cachedClasses: LlamaClasses | undefined = undefined; | ||
|
||
export function getLlamaClasses(): LlamaClasses { | ||
if (cachedClasses == null) | ||
cachedClasses = Object.seal({ | ||
LlamaChatSession, | ||
LlamaChat, | ||
LlamaCompletion | ||
}); | ||
|
||
return cachedClasses; | ||
} |