generated from hejny/spacetrim
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
169 additions
and
111 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
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
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 |
---|---|---|
|
@@ -16,7 +16,7 @@ <h1>esting remote server of PromptBook</h1> | |
<pre id="output"><pre> | ||
|
||
<script type="module"> | ||
// TODO: [🤣] !!! Auto update version | ||
// TODO: [🍓][🤣] !!! Auto update version | ||
import { RemoteLlmExecutionTools } from 'https://cdn.jsdelivr.net/npm/@promptbook/[email protected]/+esm'; | ||
import { JavascriptEvalExecutionTools } from 'https://cdn.jsdelivr.net/npm/@promptbook/[email protected]/+esm'; | ||
import { SimplePromptbookLibrary } from 'https://cdn.jsdelivr.net/npm/@promptbook/[email protected]/+esm'; | ||
|
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
TODO: !!! Probbably remove usagex - just want usage | ||
TODO: [🍓] !!! Probbably remove usagex - just want usage | ||
TODO: This is only for debugging NPM always install latest prerelease version |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Wrapper around [OpenAI's SDK](https://www.npmjs.com/package/openai) to make it easier to use inside Promptbooks. | ||
|
||
<!--!!! Link Simillar wrappers --> | ||
<!-- TODO: [🍓] !!! Link Simillar wrappers --> |
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 +1 @@ | ||
<!-- TODO: !!! Sample of use + interlink server and client --> | ||
<!-- TODO: [🍓] !!! Sample of use + interlink server and client --> |
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 +1 @@ | ||
<!-- TODO: !!! Sample of use + interlink server and client --> | ||
<!-- TODO: [🍓] !!! Sample of use + interlink server and client --> |
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
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
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
22 changes: 21 additions & 1 deletion
22
src/library/constructors/createPromptbookLibraryFromDirectory.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
import { isRunningInNode } from '../../utils/isRunningInWhatever'; | ||
import { PromptbookLibrary } from '../PromptbookLibrary'; | ||
|
||
/** | ||
* Constructs Promptbook from given directory | ||
* | ||
* Note: Works only in Node.js environment because it reads the file system | ||
* Note: The function does NOT return promise it returns the library directly which dynamically loads promptbooks when needed | ||
* SO during the construction syntax and logic sources IS NOT validated | ||
* | ||
* @returns PromptbookLibrary | ||
*/ | ||
export function createPromptbookLibraryFromDirectory(): PromptbookLibrary { | ||
if (!isRunningInNode()) { | ||
throw new Error( | ||
'Function `createPromptbookLibraryFromDirectory` can only be run in Node.js environment because it reads the file system.', | ||
); | ||
} | ||
|
||
throw new Error('Not implemented yet'); | ||
|
||
// TODO: !! Load dynamically DO NOT use createPromptbookLibraryFromPromise | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
return null as any; | ||
} | ||
|
||
/*** | ||
* TODO: !!! Annotate all + all to README and samples | ||
* TODO: [🍓][🚯] !!! Add to README and samples + maybe make `@promptbook/library` package | ||
*/ |
10 changes: 0 additions & 10 deletions
10
src/library/constructors/createPromptbookLibraryFromList.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.