Welcome! In this repository, you'll find a simple example of how to write your first Book and run it using the Promptbook Engine via the Python.
Follow these steps to get up and running:
First, clone this repository to your local machine.
git clone https://github.com/webgptorg/hello-world-python.git
cd hello-world-python
- Install Python
- Install Node.js and NPM
- Install the NPM dependencies
npm ci
Note: Currently, installation is supported only via NPM. We are actively working on adding support for other package managers and installer files such as .msi
, .rpm
, and .deb
.
Create a .env
file in the root of the project to configure the necessary API keys for the model providers you plan to use:
# Note: You can configure just one of the keys, but you need to set at least one.
OPENAI_API_KEY=sk-proj-...
DEEPSEEK_GENERATIVE_AI_API_KEY=sk-...
GOOGLE_GENERATIVE_AI_API_KEY=AI...
ANTHROPIC_CLAUDE_API_KEY=sk-ant-api03-...
From the root of the repository, execute the following command to run the example:
python ./generate-poem.py
If everything is set up correctly, you should see the following output:
$ python ./generate-poem.py
--- output ---
{'result': '{"result": "..."}'}
🚀✨ Congratulations! You've successfully created your first book with Promptbook! Now you can continue with the examples or the book language blueprint to dive deeper into the book language, integrate books into your app or create instant miniapps without classical programming.