Socket
Socket
Sign inDemoInstall

@promptbook/remote-client

Package Overview
Dependencies
Maintainers
1
Versions
417
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@promptbook/remote-client - npm Package Compare versions

Comparing version 0.44.0-17 to 0.44.0-19

4

package.json
{
"name": "@promptbook/remote-client",
"version": "0.44.0-17",
"version": "0.44.0-19",
"description": "Library to supercharge your use of large language models",

@@ -40,3 +40,3 @@ "private": false,

"peerDependencies": {
"@promptbook/core": "0.44.0-17"
"@promptbook/core": "0.44.0-19"
},

@@ -43,0 +43,0 @@ "main": "./umd/index.umd.js",

@@ -5,2 +5,740 @@ # ![Promptbook logo - cube with letters P and B](./other/design/logo-h1.png) Promptbook

[Read the manual](https://github.com/webgptorg/promptbook)
<!--Badges-->
<!--โš ๏ธWARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/800-badges/badges.ts so every manual change will be overwritten.-->
[![License of ๐Ÿ“– Prompt book](https://img.shields.io/github/license/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/blob/main/LICENSE)
[![Known Vulnerabilities](https://snyk.io/test/github/webgptorg/promptbook/badge.svg)](https://snyk.io/test/github/webgptorg/promptbook)
[![Issues](https://img.shields.io/github/issues/webgptorg/promptbook.svg?style=flat)](https://github.com/webgptorg/promptbook/issues)
<!--/Badges-->
> โš  Warning: This library is still in early development.
## ๐Ÿค Whitepaper
When you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 2, or whatever, it doesn't matter how it is integrated. Whether it's the direct calling of a REST API, using the SDK, hardcoding the prompt in the source code, or importing a text file, the process remains the same.
If you need something more advanced or want to extend the capabilities of LLMs, you generally have three ways to proceed:
1. **Fine-tune** the model to your specifications or even train your own.
2. **Prompt-engineer** the prompt to the best shape you can achieve.
3. Use **multiple prompts** in a pipeline to get the best result.
In any of these situations, but especially in (3), the Promptbook library can make your life easier and make **orchestraror for your prompts**.
- **Separation of concerns** between prompt engineer and programmer; between code files and prompt files; and between prompts, templates, templating pipelines, and their execution logic.
- Set up a **common format** for prompts that is interchangeable between projects and language/technology stacks.
- **Preprocessing** and cleaning the input data from the user.
- Use default values - **Jokers** to bypass some parts of the pipeline.
- **Expect** some specific output from the model.
- **Retry** mismatched outputs.
- **Combine** multiple models together.
- Interactive **User interaction** with the model and the user.
- Leverage **external** sources (like ChatGPT plugins or OpenAI's GPTs).
- Simplify your code to be **DRY** and not repeat all the boilerplate code for each prompt.
- **Versioning** of promptbooks
- **Reuse** parts of promptbooks in/between projects.
- Run the LLM **optimally** in parallel, with the best _cost/quality_ ratio or _speed/quality_ ratio.
- **Execution report** to see what happened during the execution.
- **Logging** the results of the promptbooks.
- _(Not ready yet)_ **Caching** calls to LLMs to save money and time.
- _(Not ready yet)_ Extend one prompt book from another one.
- _(Not ready yet)_ Leverage the **streaming** to make super cool UI/UX.
- _(Not ready yet)_ **A/B testing** to determine which prompt works best for the job.
![WebGPT](./other/screencasts/screencast-fiabciakcmgepblmdkmemdbbkilneeeh-2023.10.26-21_46_17.gif)
## ๐Ÿง” Promptbook _(for prompt-engeneers)_
**P**romp**t** **b**oo**k** markdown file (**PTBK** for short, or `.ptbk.md`) is document that describes a series of prompts that are chained together to form somewhat reciepe for transforming natural language input. Inside a PTBK you can use chat prompts, completion prompts, scripting or trigger interaction with user to ask for additional information.
- Multiple promptbooks forms a library which will become a **part of your application codebase**.
- Theese promptbooks are designed such as they **can be written by non-programmers**.
<!-- TODO: [๐Ÿง ] Make some more clear escaping -->
### Sample:
File `write-website-content.ptbk.md`:
<!------------------------[ Sample: ]------------------------>
> # ๐ŸŒ Create website content
>
> Instructions for creating web page content.
>
> - PROMPTBOOK URL https://promptbook.webgpt.com/en/write-website-content.ptbk.md@v0.1.0
> - PROMPTBOOK VERSION 0.0.1
> - INPUTโ€ฏโ€ฏPARAM `{rawTitle}` Automatically suggested a site name or empty text
> - INPUTโ€ฏโ€ฏPARAM `{rawAssigment}` Automatically generated site entry from image recognition
> - OUTPUTโ€ฏPARAM `{content}` Web content
> - OUTPUTโ€ฏPARAM `{keywords}` Keywords
>
> ## ๐Ÿ‘ค Specifying the assigment
>
> What is your web about?
>
> - PROMPT DIALOG
>
> ```
> {rawAssigment}
> ```
>
> `-> {assigment}` Website assignment and specification
>
> ## โœจ Improving the title
>
> - MODEL VARIANT Chat
> - MODEL NAME `gpt-4`
> - POSTPROCESSING `unwrapResult`
>
> ```
> As an experienced marketing specialist, you have been entrusted with improving the name of your client's business.
>
> A suggested name from a client:
> "{rawTitle}"
>
> Assignment from customer:
>
> > {assigment}
>
> ## Instructions:
>
> - Write only one name suggestion
> - The name will be used on the website, business cards, visuals, etc.
> ```
>
> `-> {enhancedTitle}` Enhanced title
>
> ## ๐Ÿ‘ค Website title approval
>
> Is the title for your website okay?
>
> - PROMPT DIALOG
>
> ```
> {enhancedTitle}
> ```
>
> `-> {title}` Title for the website
>
> ## ๐Ÿฐ Cunning subtitle
>
> - MODEL VARIANT Chat
> - MODEL NAME `gpt-4`
> - POSTPROCESSING `unwrapResult`
>
> ```
> As an experienced copywriter, you have been entrusted with creating a claim for the "{title}" web page.
>
> A website assignment from a customer:
>
> > {assigment}
>
> ## Instructions:
>
> - Write only one name suggestion
> - Claim will be used on website, business cards, visuals, etc.
> - Claim should be punchy, funny, original
> ```
>
> `-> {claim}` Claim for the web
>
> ## ๐Ÿšฆ Keyword analysis
>
> - MODEL VARIANT Chat
> - MODEL NAME `gpt-4`
>
> ```
> As an experienced SEO specialist, you have been entrusted with creating keywords for the website "{title}".
>
> Website assignment from the customer:
>
> > {assigment}
>
> ## Instructions:
>
> - Write a list of keywords
> - Keywords are in basic form
>
> ## Example:
>
> - Ice cream
> - Olomouc
> - Quality
> - Family
> - Tradition
> - Italy
> - Craft
>
> ```
>
> `-> {keywords}` Keywords
>
> ## ๐Ÿ”— Combine the beginning
>
> - SIMPLE TEMPLATE
>
> ```
>
> # {title}
>
> > {claim}
>
> ```
>
> `-> {contentBeginning}` Beginning of web content
>
> ## ๐Ÿ–‹ Write the content
>
> - MODEL VARIANT Completion
> - MODEL NAME `gpt-3.5-turbo-instruct`
>
> ```
> As an experienced copywriter and web designer, you have been entrusted with creating text for a new website {title}.
>
> A website assignment from a customer:
>
> > {assigment}
>
> ## Instructions:
>
> - Text formatting is in Markdown
> - Be concise and to the point
> - Use keywords, but they should be naturally in the text
> - This is the complete content of the page, so don't forget all the important information and elements the page should contain
> - Use headings, bullets, text formatting
>
> ## Keywords:
>
> {keywords}
>
> ## Web Content:
>
> {contentBeginning}
> ```
>
> `-> {contentBody}` Middle of the web content
>
> ## ๐Ÿ”— Combine the content
>
> - SIMPLE TEMPLATE
>
> ```markdown
> {contentBeginning}
>
> {contentBody}
> ```
>
> `-> {content}`
<!------------------------[ /Sample ]------------------------>
Following is the scheme how the promptbook above is executed:
```mermaid
%% ๐Ÿ”ฎ Tip: Open this on GitHub or in the VSCode website to see the Mermaid graph visually
flowchart LR
subgraph "๐ŸŒ Create website content"
direction TB
input((Input)):::input
templateSpecifyingTheAssigment(๐Ÿ‘ค Specifying the assigment)
input--"{rawAssigment}"-->templateSpecifyingTheAssigment
templateImprovingTheTitle(โœจ Improving the title)
input--"{rawTitle}"-->templateImprovingTheTitle
templateSpecifyingTheAssigment--"{assigment}"-->templateImprovingTheTitle
templateWebsiteTitleApproval(๐Ÿ‘ค Website title approval)
templateImprovingTheTitle--"{enhancedTitle}"-->templateWebsiteTitleApproval
templateCunningSubtitle(๐Ÿฐ Cunning subtitle)
templateWebsiteTitleApproval--"{title}"-->templateCunningSubtitle
templateSpecifyingTheAssigment--"{assigment}"-->templateCunningSubtitle
templateKeywordAnalysis(๐Ÿšฆ Keyword analysis)
templateWebsiteTitleApproval--"{title}"-->templateKeywordAnalysis
templateSpecifyingTheAssigment--"{assigment}"-->templateKeywordAnalysis
templateCombineTheBeginning(๐Ÿ”— Combine the beginning)
templateWebsiteTitleApproval--"{title}"-->templateCombineTheBeginning
templateCunningSubtitle--"{claim}"-->templateCombineTheBeginning
templateWriteTheContent(๐Ÿ–‹ Write the content)
templateWebsiteTitleApproval--"{title}"-->templateWriteTheContent
templateSpecifyingTheAssigment--"{assigment}"-->templateWriteTheContent
templateKeywordAnalysis--"{keywords}"-->templateWriteTheContent
templateCombineTheBeginning--"{contentBeginning}"-->templateWriteTheContent
templateCombineTheContent(๐Ÿ”— Combine the content)
templateCombineTheBeginning--"{contentBeginning}"-->templateCombineTheContent
templateWriteTheContent--"{contentBody}"-->templateCombineTheContent
templateCombineTheContent--"{content}"-->output
output((Output)):::output
classDef input color: grey;
classDef output color: grey;
end;
```
[More template samples](./samples/templates/)
_Note: We are using [postprocessing functions](#postprocessing-functions) like `unwrapResult` that can be used to postprocess the result._
## ๐Ÿ“š Dictionary
The following glossary is used to clarify certain basic concepts:
### Prompt
Prompt in a text along with model requirements, but without any execution or templating logic.
For example:
```json
{
"request": "Which sound does a cat make?",
"modelRequirements": {
"variant": "CHAT"
}
}
```
```json
{
"request": "I am a cat.\nI like to eat fish.\nI like to sleep.\nI like to play with a ball.\nI l",
"modelRequirements": {
"variant": "COMPLETION"
}
}
```
### Prompt Template
Similar concept to Prompt, but with templating logic.
For example:
```json
{
"request": "Which sound does a {animalName} make?",
"modelRequirements": {
"variant": "CHAT"
}
}
```
### Model Requirements
Abstract way to specify the LLM.
It does not specify the LLM with concrete version itself, only the requirements for the LLM.
_NOT chatgpt-3.5-turbo BUT CHAT variant of GPT-3.5._
For example:
```json
{
"variant": "CHAT",
"version": "GPT-3.5",
"temperature": 0.7
}
```
### Execution type
Each block of promptbook can have a different execution type.
It is specified in list of requirements for the block.
By default, it is `Prompt template`
- _(default)_ `Prompt template` The block is a prompt template and is executed by LLM (OpenAI, Azure,...)
- `SIMPLE TEMPLATE` The block is a simple text template which is just filled with parameters
- `Script` The block is a script that is executed by some script runtime, the runtime is determined by block type, currently only `javascript` is supported but we plan to add `python` and `typescript` in the future.
- `PROMPT DIALOG` Ask user for input
### Parameters
Parameters that are placed in the prompt template and replaced to create the prompt.
It is a simple key-value object.
```json
{
"animalName": "cat",
"animalSound": "Meow!"
}
```
There are three types of template parameters, depending on how they are used in the promptbook:
- **INPUT PARAMETER**s are required to execute the promptbook.
- **Intermediate parameters** are used internally in the promptbook.
- **OUTPUT PARAMETER**s are explicitelly marked and they are returned as the result of the promptbook execution.
_Note: Parameter can be both intermedite and output at the same time._
### Promptbook
Promptbook is **core concept of this library**.
It represents a series of prompt templates chained together to form a **pipeline** / one big prompt template with input and result parameters.
Internally it can have multiple formats:
- **.ptbk.md file** in custom markdown format described above
- _(concept)_ **.ptbk** format, custom fileextension based on markdown
- _(internal)_ **JSON** format, parsed from the .ptbk.md file
### Promptbook **Library**
Library of all promptbooks used in your application.
<!-- TODO: !!! Write more -->
### Prompt Result
Prompt result is the simplest concept of execution.
It is the result of executing one prompt _(NOT a template)_.
For example:
```json
{
"response": "Meow!",
"model": "chatgpt-3.5-turbo"
}
```
### Execution Tools
`ExecutionTools` is an interface which contains all the tools needed to execute prompts.
It contais 3 subtools:
- `NaturalExecutionTools`
- `ScriptExecutionTools`
- `UserInterfaceTools`
Which are described below:
#### Natural Execution Tools
`NaturalExecutionTools` is a container for all the tools needed to execute prompts to large language models like GPT-4.
On its interface it exposes common methods for prompt execution.
Internally it calls OpenAI, Azure, GPU, proxy, cache, logging,...
`NaturalExecutionTools` an abstract interface that is implemented by concrete execution tools:
- `OpenAiExecutionTools`
- _(Not implemented yet)_ `AnthropicClaudeExecutionTools`
- _(Not implemented yet)_ `AzureOpenAiExecutionTools`
- _(Not implemented yet)_ `BardExecutionTools`
- _(Not implemented yet)_ `LamaExecutionTools`
- _(Not implemented yet)_ `GpuExecutionTools`
- And a special case are `RemoteNaturalExecutionTools` that connect to a remote server and run one of the above execution tools on that server.
- The second special case is `MockedEchoNaturalExecutionTools` that is used for testing and mocking.
- The third special case is `LogNaturalExecutionToolsWrapper` that is technically also an execution tools but it is more proxy wrapper around other execution tools that logs all calls to execution tools.
#### Script Execution Tools
`ScriptExecutionTools` is an abstract container that represents all the tools needed to EXECUTE SCRIPTs. It is implemented by concrete execution tools:
- `JavascriptExecutionTools` is a wrapper around `vm2` module that executes javascript code in a sandbox.
- `JavascriptEvalExecutionTools` is wrapper around `eval` function that executes javascript. It is used for testing and mocking **NOT intended to use in the production** due to its unsafe nature, use `JavascriptExecutionTools` instead.
- _(Not implemented yet)_ `TypescriptExecutionTools` executes typescript code in a sandbox.
- _(Not implemented yet)_ `PythonExecutionTools` executes python code in a sandbox.
There are [postprocessing functions](#postprocessing-functions) that can be used to postprocess the result.
#### User Interface Tools
`UserInterfaceTools` is an abstract container that represents all the tools needed to interact with the user. It is implemented by concrete execution tools:
- _(Not implemented yet)_ `ConsoleInterfaceTools` is a wrapper around `readline` module that interacts with the user via console.
- `SimplePromptInterfaceTools` is a wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt. It is used for testing and mocking **NOT intended to use in the production** due to its synchronous nature.
- `CallbackInterfaceTools` delagates the user interaction to a async callback function. You need to provide your own implementation of this callback function and its bind to UI. <!-- <- TODO: Provide here a way how to do it with some our plugin -->
### Executor
Executor is a simple async function that takes **input parameters** and returns **output parameters**.
It is constructed by combining execution tools and promptbook to execute together.
### ๐Ÿƒ Jokers
Joker is a previously defined parameter that is used to bypass some parts of the pipeline.
If the joker is present in the template, it is checked to see if it meets the requirements (without postprocessing), and if so, it is used instead of executing that prompt template. There can be multiple wildcards in a prompt template, if so they are checked in order and the first one that meets the requirements is used.
If none of the jokers meet the requirements, the prompt template is executed as usual.
This can be useful, for example, if you want to use some predefined data, or if you want to use some data from the user, but you are not sure if it is suitable form.
When using wildcards, you must have at least one minimum expectation. If you do not have a minimum expectation, the joker will always fulfil the expectation because it has none, so it makes no logical sense.
Look at [jokers.ptbk.md](samples/templates/41-jokers.ptbk.md) sample.
### Postprocessing functions
You can define postprocessing functions when creating `JavascriptEvalExecutionTools`:
```
```
Additionally there are some usefull string-manipulation build-in functions, which are [listed here](src/execution/plugins/script-execution-tools/javascript/JavascriptEvalExecutionTools.ts).
### Expectations
`Expect` command describes the desired output of the prompt template (after post-processing)
It can set limits for the maximum/minimum length of the output, measured in characters, words, sentences, paragraphs,...
_Note: LLMs work with tokens, not characters, but in Promptbooks we want to use some human-recognisable and cross-model interoperable units._
```markdown
# โœจ Sample: Expectations
- PROMPTBOOK URL https://promptbook.example.com/samples/postprocessing-2.ptbk.md@v1
- PROMPTBOOK VERSION 1.0.0
- INPUTโ€ฏโ€ฏPARAMETER {yourName} Name of the hero
## ๐Ÿ’ฌ Question
- EXPECT MAX 30 CHARACTERS
- EXPECT MIN 2 CHARACTERS
- EXPECT MAX 3 WORDS
- EXPECT EXACTLY 1 SENTENCE
- EXPECT EXACTLY 1 LINE
...
```
There are two types of expectations which are not strictly symmetrical:
#### Minimal expectations
- `EXPECT MIN 0 ...` is not valid minimal expectation. It makes no sense.
- `EXPECT JSON` is both minimal and maximal expectation
- When you are using `JOKER` in same prompt template, you need to have at least one minimal expectation
#### Maximal expectations
- `EXPECT MAX 0 ...` is valid maximal expectation. For example, you can expect 0 pages and 2 sentences.
- `EXPECT JSON` is both minimal and maximal expectation
Look at [expectations.ptbk.md](samples/templates/45-expectations.ptbk.md) and [expect-json.ptbk.md](samples/templates/45-expect-json.ptbk.md) samples for more.
<!--
### New
[๐Ÿฅป] Insert here when making new command
-->
### Execution report
Execution report is a simple object or markdown that contains information about the execution of the promptbook.
[See the example of such a report](/samples/templates/50-advanced.report.md)
<!-- TODO: Write more -->
### Remote server
Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
You can simply use `RemoteExecutionTools` on client-side javascript and connect to your remote server.
This is useful to make all logic on browser side but not expose your API keys or no need to use customer's GPU.
## ๐Ÿ‘จโ€๐Ÿ’ป Usage and integration _(for developers)_
<!--
TODO: [๐Ÿง™โ€โ™‚๏ธ]
### ๐Ÿง™โ€โ™‚๏ธ Using wizzard
First you need to install this library:
```bash
npm install --save @promptbook/wizzard
```
> TODO: !! Write the Wizzard sample
[Usage samples](./samples/usage/)
-->
### ๐Ÿ”Œ Usage in Typescript / Javascript
- [Simple usage](./samples/usage/simple-script)
- [Usage with client and remote server](./samples/usage/remote)
## โ” FAQ
If you have a question [start a discussion](https://github.com/webgptorg/promptbook/discussions/), [open an issue](https://github.com/webgptorg/promptbook/issues) or [write me an email](https://www.pavolhejny.com/contact).
### Why not just use the OpenAI SDK / Anthropic Claude SDK / ...?
Different levels of abstraction. OpenAI library is for direct use of OpenAI API. This library is for a higher level of abstraction. It is for creating prompt templates and promptbooks that are independent of the underlying library, LLM model, or even LLM provider.
### How is it different from the Langchain library?
Langchain is primarily aimed at ML developers working in Python. This library is for developers working in javascript/typescript and creating applications for end users.
We are considering creating a bridge/converter between these two libraries.
<!--
==========
Include:
- Langchain is the python library and JavaScript is on second place
- Langchain primarily focused on making templates, not on combining templates into larger structures
- at the language level it distinguishes between chat and completion, I need to mix the two into one template pipeline
- for a non-programmer it's quite hard to work with such a thing and write templates - I would much prefer a system that allows non-technical people to write templates (of which there are many more on the market than free pythonists)
- The focus of promptbooks is primarily on building user applications, not the data processing, training or autogpt.
-->
### Promptbooks vs. OpenAI`s GPTs
GPTs are chat assistants that can be assigned to specific tasks and materials. But they are still chat assistants. Promptbooks are a way to orchestrate many more predefined tasks to have much tighter control over the process. Promptbooks are not a good technology for creating human-like chatbots, GPTs are not a good technology for creating outputs with specific requirements.
<!--
TODO:!!!
### Promptbooks vs. Semantic Kernel
-->
<!--
TODO:
### Promptbooks vs. Langtail
-->
<!--
TODO:
### Promptbooks vs. Evidentally AI
Logging and monitoring
-->
### Where should I store my promptbooks?
If you use raw SDKs, you just put prompts in the sourcecode, mixed in with typescript, javascript, python or whatever programming language you use.
If you use promptbooks, you can store them in several places, each with its own advantages and disadvantages:
1. As **source code**, typically git-committed. In this case you can use the versioning system and the promptbooks will be tightly coupled with the version of the application. You still get the power of promptbooks, as you separate the concerns of the prompt-engineer and the programmer.
2. As data in a **database** In this case, promptbooks are like posts / articles on the blog. They can be modified independently of the application. You don't need to redeploy the application to change the promptbooks. You can have multiple versions of promptbooks for each user. You can have a web interface for non-programmers to create and modify promptbooks. But you lose the versioning system and you still have to consider the interface between the promptbooks and the application _(= input and output parameters)_.
3. In a **configuration** in environment variables. This is a good way to store promptbooks if you have an application with multiple deployments and you want to have different but simple promptbooks for each deployment and you don't need to change them often.
### What should I do when I need same promptbook in multiple human languages?
A single promptbook can be written for several _(human)_ languages at once. However, we recommend that you have separate promptbooks for each language.
In large language models, you will get better results if you have prompts in the same language as the user input.
The best way to manage this is to have suffixed promptbooks like `write-website-content.en.ptbk.md` and `write-website-content.cs.ptbk.md` for each supported language.
<!--
TODO: (Maybe)
### Why you need to explicitly specify input and output parameters?
-->
<!--
!!!!
unit testing
escaping
how i get block into prompt
## ๐Ÿšท Limitations
function calling
system message
iterations
-->
## โŒš Changelog
See [CHANGELOG.md](./CHANGELOG.md)
## ๐ŸŽฏ TODOs
- [ ][๐Ÿง™โ€โ™‚๏ธ] Make Wizzard
- [x] Make from this folder a separate repository + npm package
- [x] Add tests
- [ ] Annotate all entities
- [ ] Make internal string aliases
- [ ] Make branded types instead of pure `string` aliases
- [ ] Remove all `any`
- [ ][๐Ÿ‘ง] Make strongy typed input+output parameters in executors
- [x] Make promptbooks non-linear
- [x] Logging pipeline name, version, step,...
- [ ][๐Ÿง ] Wording: "param" vs "parameter" vs "variable" vs "argument"
- [ ] All entities must have public / private / protected modifiers
- [ ] Everything not needed should be private or not exported
- [ ] Refactor circular dependencies
- [ ] Importing subtemplates
- [ ] Use `spaceTrim` more effectively
- [ ] [๐Ÿคนโ€โ™‚๏ธ] Allow chats to be continued with previous message
- [ ] [๐Ÿง ][๐Ÿคนโ€โ™‚๏ธ] How to mark continued chat in .ptbk.md format?
- [ ] Use newest version of socket.io for remote server
- [ ] [๐Ÿง ] Allow to use and define [function calling](https://platform.openai.com/docs/guides/gpt/function-calling)
- [x] Register .ptbk file extension
- [ ] Fix error `content.js:73 Uncaught (in promise) TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))`
- [ ] Aborting execution, maybe use native AbortController
- [ ] Change `import {...} from '...';` to `import type {...} from '...';` when importing only types
- [x] Wrap OpenAI billing errors:
- [ ] Integrate word stemmer https://github.com/maxpatiiuk/porter-stemming/blob/main/src/index.ts
- [ ] Integrate faker to generate simple mocked data
- [ ] Put postprocessing + expectations into mermaid graphs
- [ ] mermaid graphs as exported CLI util
- [ ] Preprocessing
- [ ] System to bundle up Preprocessing + Postprocessing + Expectations
- [ ] Integrate ceaser-cipher to auto preprocess some and postprocess templates
- [ ] Scenario: Expect all information (for example in incomming email), when not then return = kinda reverse joker
- [ ] Make VSCode extension for validation/syntax highlite (and for other editors)
- "Billing hard limit has been reached"
- "You exceeded your current quota, please check your plan and billing details."
<!--Contributing-->
<!--โš ๏ธWARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/810-contributing/contributing.ts so every manual change will be overwritten.-->
## ๐Ÿ–‹๏ธ Contributing
I am open to pull requests, feedback, and suggestions. Or if you like this utility, you can [โ˜• buy me a coffee](https://www.buymeacoffee.com/hejny) or [donate via cryptocurrencies](https://github.com/hejny/hejny/blob/main/documents/crypto.md).
You can also โญ star the promptbook package, [follow me on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/).
<!--/Contributing-->
<!--Custom Partners-->
<!--โš ๏ธWARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/820-partners/partners.ts so every manual change will be overwritten.-->
## โœจ Partners
<a href="https://webgpt.cz/">
<img src="https://webgpt.cz/_next/static/media/webgpt.white.04a40f79.svg" alt="SigmaStamp logo" height="50" />
</a>
&nbsp;&nbsp;&nbsp;
<a href="https://collboard.com/">
<img src="https://collboard.fra1.cdn.digitaloceanspaces.com/assets/18.12.1/logo-small.png" alt="Collboard logo" height="50" />
</a>
<!--
TODO: Add here Ai*nautes
-->
[Become a partner](https://www.pavolhejny.com/contact/)
<!--/Custom Partners-->
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc