100% found this document useful (13 votes)
606 views

Download (Ebook) OpenAI API Cookbook: Build intelligent applications including chatbots, virtual assistants, and content generators by Henry Habib ISBN 9781805121350, 1805121359 ebook All Chapters PDF

The document promotes the 'OpenAI API Cookbook' by Henry Habib, which guides readers on building intelligent applications like chatbots and virtual assistants using the OpenAI API. It includes practical examples and covers setup, API endpoints, and application development. The book is aimed at professionals and citizen developers looking to leverage AI technology effectively.

Uploaded by

kybrajoanvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (13 votes)
606 views

Download (Ebook) OpenAI API Cookbook: Build intelligent applications including chatbots, virtual assistants, and content generators by Henry Habib ISBN 9781805121350, 1805121359 ebook All Chapters PDF

The document promotes the 'OpenAI API Cookbook' by Henry Habib, which guides readers on building intelligent applications like chatbots and virtual assistants using the OpenAI API. It includes practical examples and covers setup, API endpoints, and application development. The book is aimed at professionals and citizen developers looking to leverage AI technology effectively.

Uploaded by

kybrajoanvi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Download Full Version ebook - Visit ebooknice.

com

(Ebook) OpenAI API Cookbook: Build intelligent


applications including chatbots, virtual
assistants, and content generators by Henry Habib
ISBN 9781805121350, 1805121359
https://ebooknice.com/product/openai-api-cookbook-build-
intelligent-applications-including-chatbots-virtual-
assistants-and-content-generators-56104176

Click the button below to download

DOWLOAD EBOOK

Discover More Ebook - Explore Now at ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) OpenAI API Cookbook: Build intelligent


applications including chatbots, virtual assistants, and
content generators by Henry Habib ISBN 9781805121350,
1805121359, B0CT8W7B79
https://ebooknice.com/product/openai-api-cookbook-build-intelligent-
applications-including-chatbots-virtual-assistants-and-content-
generators-56106822
ebooknice.com

(Ebook) Biota Grow 2C gather 2C cook by Loucas, Jason;


Viles, James ISBN 9781459699816, 9781743365571,
9781925268492, 1459699815, 1743365578, 1925268497
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374

ebooknice.com

(Ebook) Developing Apps with GPT-4 and ChatGPT: Build


Intelligent Chatbots, Content Generators, and More by
Olivier Caelen ISBN 9781098152482, 1098152484
https://ebooknice.com/product/developing-apps-with-gpt-4-and-chatgpt-
build-intelligent-chatbots-content-generators-and-more-51846228

ebooknice.com

(Ebook) Developing Apps with GPT-4 and ChatGPT: Build


Intelligent Chatbots, Content Generators, and More by
Olivier Caelen, Marie-Alice Blete ISBN 9781098152444,
1098152441
https://ebooknice.com/product/developing-apps-with-gpt-4-and-chatgpt-
build-intelligent-chatbots-content-generators-and-more-52598586

ebooknice.com
(Ebook) Matematik 5000+ Kurs 2c Lärobok by Lena
Alfredsson, Hans Heikne, Sanna Bodemyr ISBN 9789127456600,
9127456609
https://ebooknice.com/product/matematik-5000-kurs-2c-larobok-23848312

ebooknice.com

(Ebook) SAT II Success MATH 1C and 2C 2002 (Peterson's SAT


II Success) by Peterson's ISBN 9780768906677, 0768906679

https://ebooknice.com/product/sat-ii-success-
math-1c-and-2c-2002-peterson-s-sat-ii-success-1722018

ebooknice.com

(Ebook) Master SAT II Math 1c and 2c 4th ed (Arco Master


the SAT Subject Test: Math Levels 1 & 2) by Arco ISBN
9780768923049, 0768923042
https://ebooknice.com/product/master-sat-ii-math-1c-and-2c-4th-ed-
arco-master-the-sat-subject-test-math-levels-1-2-2326094

ebooknice.com

(Ebook) Cambridge IGCSE and O Level History Workbook 2C -


Depth Study: the United States, 1919-41 2nd Edition by
Benjamin Harrison ISBN 9781398375147, 9781398375048,
1398375144, 1398375047
https://ebooknice.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-53538044

ebooknice.com

(Ebook) Web API Cookbook: Level Up Your JavaScript


Applications by Joe Attardi

https://ebooknice.com/product/web-api-cookbook-level-up-your-
javascript-applications-56376958

ebooknice.com
OpenAI API Cookbook
Copyright © 2024 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing or its dealers and distributors, will be held liable for any damages
caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Niranjan Naikwadi

Publishing Product Manager: Tejashwini R

Executive Editor: Mudita S

Technical Editor: Yash Bhanushali

Copy Editor: Safis Editing

Proofreader: Safis Editing

Indexer: Hemangini Bari

Production Designers: Jyoti Kadam and Gokul Raj S.T


DevRel Marketing Coordinator: Vinishka Kalra

First published: March 2024

Production reference: 1060324

Published by

Packt Publishing Ltd.

Grosvenor House

11 St Paul’s Square

Birmingham

B3 1RB, UK.

ISBN 978-1-80512-135-0

www.packtpub.com
To Soniya, Faisal, Munira, Maheen, Karan, and Riri.
– Henry

Foreword
I started working with Henry after taking one of his online courses, where he was
teaching working professionals how they could save time and work faster by using
no-code tools. He was both passionate and practical when delivering his content.
Particularly, he focused on tangible use cases rather than abstract concepts that
did not drive real-world outcomes.

Having been in the field of AI and productivity for more than 10 years, he saw the
emerging citizen developer trend where anyone could build tools and solutions
quickly without knowing any code. When the OpenAI API was first released to the
public, Henry was one the first to teach professionals how they can use it to work
faster, and his course quickly reached bestseller status within one week of its
release.

In this book, Henry takes you on a journey on how to use the OpenAI API to build
intelligent applications – tools that you can use to automate processes, improve
productivity, save time, or build new businesses. He starts by introducing the
OpenAI API and its endpoints, features, and parameters, and then he uses it to
build apps and assistants. Throughout the book, he always adds practical and real-
life examples so that you can start creating an impact from the first page.

This is an essential guide for knowledge workers eager to harness the power of
OpenAI and ChatGPT to build intelligent applications and solutions. It enables you
to integrate the OpenAI API into various domains, from simple apps to whole
assistants.

Henry is also the architect behind The Intelligent Worker, one of the largest
newsletters focused on teaching everyday workers how they can be productive at
work with AI, automation, no-code, and other technologies. He continues his
mission to empower individuals and boost their productivity through technologies
with his online courses.
Sam McKay, CEO and founder of Enterprise DNA, which offers top-notch data and
AI skills training to over 220,000 data professionals

Today, AI and ChatGPT are much more than household words, being a consistent
and animated point of discussion and debate. However, they are also immediately
actionable tools that can deliver a mind-bending list of potential applications.
Unlike any technology in history, AI (and ChatGPT) has eclipsed traditional
milestones in user usage, spurring spectacular growth from application ideas
through to development and deployment.

For people like you (and me), who are interested in implementing ChatGPT in new
and innovative ways, ChatGPT’s meteoric rise to prominence is a testament to the
relevance of the problems it solves, and to the importance that information and
tools play in today’s digital society. With its unparalleled ability to understand and
generate human-like text, ChatGPT represents not just a technological leap but a
paradigm shift in human-computer interaction.

As you journey through this book, I strongly encourage you to take copious notes
and to use it as the working handbook that Henry Habib intended it to be. Use it
to create your next successful app or business, or employ it to enrich your thinking
about how to innovate your next great thing. In fact, I hope you will do what any
successful entrepreneur, innovator, investor, or developer does when they are
presented with a lot of information and opportunity – dream on it. That’s right –
take the ideas and information you gain in this book and dream on it. Then, return
to the book again and again to fashion your dreams into a reality with the tools
you will have gained here.

I believe Henry has masterfully constructed OpenAI API Cookbook. But I knew he
could and would when I first learned of this project. From the day Henry and I
first met, I recognized in him an impressive combination of technical expertise and
communications skills. As a result, I have engaged him in professional
development and educational programs for a global network of enterprises
(including HSBC) and online education platforms (including Coursera). His
proficiency in tools such as SQL, Python, Spark, Qlik Sense, and TensorFlow,
combined with his practical knowledge of big data analysis in financial services,
retail, and telecommunications, his underlining passion for AI and machine
learning, and his ability to communicate simply make him an ideal author to create
this guidebook.

I know you will thoroughly enjoy this book, as I did. Use it, as I have, and see
your next dream come true.

Paul Siegel, serial technology entrepreneur and CEO and founder of Starweaver, a
top-tier education platform focused on technology and business

Contributors

About the author


Henry Habib is a manager at one of the world’s top management consulting
firms, advising F500 companies on analytics and operations, with a particular focus
on building intelligent AI-driven solutions and tools to create impact. He is a
passionate online instructor and educator, amassing a network of more than
150,000 paid students and facilitating technical programs at large banks and
governmental organizations.

A proponent of the no-code and LLM revolution, he believes that anyone can now
create powerful and intelligent applications without any deep technical skills.
Henry resides in Toronto, Canada, with his wife, and he enjoys reading AI research
papers and playing tennis in his free time.
I want to thank Mudita, Tejashwini, and the Packt team for helping me
expand my passion for education to the written medium.

About the reviewers


Arindam Ganguly has been working as an experienced data scientist at one of
the leading multi-national software service firms for more than eight years, where
he is responsible for developing and designing intelligent solutions, leveraging his
expertise in AI and data analytics. He also has a vast amount of expertise in
developing automation and hyper-automation solutions, leveraging automated
workflow engines, and integrating them with AI.

Arindam is also a published author, writing the book Build and Deploy Machine
Learning Solutions Using IBM Watson, which teaches you how to build AI
applications using the popular IBM Watson toolkit.

Ashutosh Vishwakarma is the co-founder of , a pioneering conversational AI


firm, and he has over eight years of expertise in developing and architecting high-
scale, machine learning-driven systems. He spearheads innovations within the
Large Language Model (LLM) ecosystem, focusing on crafting next-generation
user experiences. His comprehensive background ensures a deep understanding of
both the technical and strategic facets of AI development, from conception to
deployment.

Eswari Jayakumar is a passionate software developer with over seven years of


experience, proficient in multiple programming languages. Her expertise spans a
wide array of technologies, with a profound interest in cutting-edge fields such as
DevOps, machine learning, computer vision, and LLMs. Originally from India, she
moved to Canada to pursue her master’s in computer science at the University of
New Brunswick. In addition to her technical acumen, Eswari is an adept content
writer, sharing her technical knowledge through engaging blogs. She spends her
free time volunteering in coding communities. Follow her journey and connect with
her on LinkedIn (www.linkedin.com/in/eswarijayakumar).
Table of Contents

Preface

Unlocking OpenAI and Setting Up Your API


Playground Environment

Technical requirements

Setting up your OpenAI Playground environment

Getting ready

How to do it…

How it works…

Running a completion request in the OpenAI


Playground

Getting ready

How to do it…

How it works…

There’s more…
Using the System Message in the OpenAI
Playground

How to do it…

How it works…

There’s more…

Using the Chat Log to modify the model’s


behavior

How to do it…

How it works…

Making OpenAI API requests with Postman

Getting ready

How to do it…

How it works…

OpenAI API Endpoints Explained

Technical requirements
Generating customized responses using the Chat
Completions endpoint

Getting ready

How to do it…

How it works…

There’s more…

Creating pictures using the Images endpoint

How to do it…

How it works…

Generating transcripts using the Audio endpoint

Getting ready

How to do it…

How it works…

Understanding Key Parameters and Their Impact on


Generated Responses

Technical requirements
Changing the model parameter and
understanding its impact on generated
responses

Getting ready

How to do it…

How it works…

Controlling the number of generated responses


using the n parameter

How to do it…

How it works…

Determining the randomness and creativity of


generated responses using the temperature
parameter

How to do it…

How it works…

Incorporating Additional Features from the OpenAI


API

Technical requirements
Using the Python library to call the OpenAI API

Getting ready

How to do it…

How it works…

Benefits and drawbacks of using the Python


library

Using the embedding model for text comparisons


and other use cases

How to do it…

How it works…

Fine-tuning a completion model

How to do it…

How it works…

Staging the OpenAI API for Application Development

Technical requirements
Creating a public endpoint server that calls the
OpenAI API

Getting ready

How to do it…

How it works…

Extending the endpoint server to accept


parameters and return data

How to do it…

How it works…

Calling the user-created endpoint from no-code


applications

Getting ready

How to do it…

How it works…

Building Intelligent Applications with the OpenAI API

Technical requirements
Creating a wrapper application that generates
replies to your emails

How to do it…

How it works…

Creating a multi-modal application that


generates travel itineraries

How to do it…

How it works…

Building Assistants with the OpenAI API

Technical requirements

Creating a knowledge-retrieval assistant


application

Getting ready

How to do it…

How it works…

Creating a knowledge-retrieval assistant


through the Assistants API
How to do it…

How it works…

Index

Other Books You May Enjoy


Preface
In the rapidly advancing generative AI world, the ability to create innovative
applications such as chatbots, virtual assistants, content generation tools, and
productivity enhancers can be a game-changer. The OpenAI API is your key to
achieving this, enabling you to build high-performance intelligent applications in
diverse industries or to increase your productivity by adding ChatGPT into your
workflows.

You will begin with the fundamentals of the OpenAI API, including setup,
authentication, and key parameters, enabling a solid foundation for working with
API.

Next, you will learn about the different elements of the OpenAI API and how to
use it effectively, along with the importance of tweaking certain parameters for
better results. You will uncover extra features of the OpenAI API that will improve
user experience and enable you to obtain refined outputs. Further, you will be
guided on moving from development to a live application; you will learn how to set
up the API for public use and application backends. Subsequently, you will be able
to build knowledge-based assistants and multi-model applications that are tailored
to your specific needs.

By the end of this book, you will have a comprehensive and practical mastery of
the OpenAI API and will be ready to build intelligent and AI-powered solutions.
Who this book is for
This book is perfect for working professionals and citizen developers who are keen
on using and mastering the OpenAI API. Ideal for quickly creating intelligent
applications such as chatbots or content generators, it caters to both beginners
and experienced professionals.

The OpenAI API in this book is accessed with Python. Familiarity with Python and
APIs is desired but absolutely not required.
What this book covers
Chapter 1, Unlocking OpenAI and Setting Up Your API Playground Environment,
covers the steps required to start working with the API and the OpenAI API
Playground.

Chapter 2, OpenAI API Endpoints Explained, delves into the various endpoints
available in the OpenAI API, with practical examples and use cases.

Chapter 3, Understanding Key Parameters and Their Impact on Generated


Responses, discusses the significance of the key API parameters.

Chapter 4, Incorporating Additional Features from the OpenAI API, explains how
to use the hidden gems of the API such as embeddings and fine-tuning.

Chapter 5, Staging the OpenAI API for Application Development, transitions from
fiddling with the API to using it to build real-life applications.

Chapter 6, Building Intelligent Applications with the OpenAI API, covers how to
build various different intelligent applications with the API.

Chapter 7, Building Assistants with the OpenAI API, provides a tutorial on how to
build knowledge-based assistants with the API.
This book contains many long screenshots. These have been captured to provide readers with an
overview of various features. As a result, the text in these images may appear small at 100%
zoom.

To get the most out of this book


This book uses Python to access the OpenAI API. Familiarity with Python is
recommended to get the most out of this book, but not required as all code
snippets that are used will be shared.

Since the book uses APIs, some knowledge of APIs and how they work is
recommended but, again, not required.
Some basic understanding of programming concepts such as functions and loops
will be needed as they will not be covered in the book.

Software/hardware covered in the OS requirements


book

Python Windows, macOS, and Linux (any)

Postman Windows, Mac OS X, and Linux


(any)

Bubble Windows, Mac OS X, and Linux


(any)

This book leverages the OpenAI API, which you may have to pay an additional fee
for if you are not eligible for the free tier. The API is charged on a per-use basis,
and as a result, any misuse or abuse of the API can unintentionally result in a
large invoice from OpenAI. You should always set limits on any API accounts that
you create.

This book also uses Google Cloud Platform to create and deploy cloud functions,
which, like the OpenAI API, can be expensive if misused. A Google account is
required to access this service.

If you are using the digital version of this book, we advise you to type
the code yourself or access the code via the GitHub repository (link
available in the next section). Doing so will help you avoid any potential
errors related to the copying and pasting of code.

Download the example code files


You can download the example code files for this book from GitHub at
https://github.com/PacktPublishing/OpenAI-API-Cookbook. If there’s an update to
the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos
available at https://github.com/PacktPublishing/. Check them out!

Conventions used
There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names,
filenames, file extensions, pathnames, dummy URLs, user input, and Twitter
handles. Here is an example: “In the System Message, type in the following: You
are an assistant that creates marketing slogans.”

A block of code is set as follows:

{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "You are an assistant that creates marketing slogans
based on descriptions of companies"
}

When we wish to draw your attention to a particular part of a code block, the
relevant lines or items are set in bold:

"role": "assistant",
"content": "Thank you for your kind words! Vanilla is
always a classic favorite. 😊🍦"
},

Any command-line input or output is written as follows:

Donald Trump's presidency showcased divisive politics and tumultuous


events.

Bold: Indicates a new term, an important word, or words that you see onscreen.
For example, words in menus or dialog boxes appear in the text like this. Here is
an example: “After you have successfully logged in, navigate to Profile in the top
right-hand menu, select Personal.”

TIPS OR IMPORTANT NOTES


Appear like this.

Sections
In this book, you will find several headings that appear frequently (Getting ready,
How to do it..., How it works..., There’s more..., and See also).

To give clear instructions on how to complete a recipe, use these sections as


follows:

Getting ready
This section tells you what to expect in the recipe and describes how to set up any
software or any preliminary settings required for the recipe.

How to do it…
This section contains the steps required to follow the recipe.

How it works…
This section usually consists of a detailed explanation of what happened in the
previous section.

There’s more…
This section consists of additional information about the recipe in order to make
you more knowledgeable about the recipe.

See also
This section provides helpful links to other useful information for the recipe.
Get in touch
Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention
the book title in the subject of your message and email us at
[email protected].

Errata: Although we have taken every care to ensure the accuracy of our content,
mistakes do happen. If you have found a mistake in this book, we would be
grateful if you would report this to us. Please visit
www.packtpub.com/support/errata, selecting your book, clicking on the Errata
Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the
Internet, we would be grateful if you would provide us with the location address or
website name. Please contact us at [email protected] with a link to the
material.

If you are interested in becoming an author: If there is a topic that you have
expertise in and you are interested in either writing or contributing to a book,
please visit authors.packtpub.com.

Share Your Thoughts


Once you’ve read OpenAI API Cookbook, we’d love to hear your thoughts! Please
click here to go straight to the Amazon review page for this book and share your
feedback.

Your review is important to us and the tech community and will help us make sure
we’re delivering excellent quality content.

Download a free PDF copy of this book


Thanks for purchasing this book!
Do you like to read on the go but are unable to carry your print books
everywhere?

Is your eBook purchase not compatible with the device of your choice?

Don’t worry, now with every Packt book you get a DRM-free PDF version of that
book at no cost.

Read anywhere, any place, on any device. Search, copy, and paste code from your
favorite technical books directly into your application.

The perks don’t stop there, you can get exclusive access to discounts, newsletters,
and great free content in your inbox daily

Follow these simple steps to get the benefits:


1. Scan the QR code or visit the link below

https://packt.link/free-ebook/9781805121350

2. Submit your proof of purchase

3. That’s it! We’ll send your free PDF and other benefits to your email directly
1

Unlocking OpenAI and Setting Up Your API


Playground Environment
ChatGPT, an advanced artificial intelligence (AI) language model developed by
OpenAI, is the fastest-growing original consumer application in history, reaching
100 million users in only 2 months. By comparison, TikTok is in second place,
reaching the same number of users in over 9 months
(https://www.forbes.com/sites/cindygordon/2023/02/02/chatgpt-is-the-fastest-
growing-ap-in-the-history-of-web-applications/?sh=3551e45d678c). The reason for
its popularity can be attributed to its ability to democratize Natural Language
Processing (NLP) models for the everyday user. NLP represents a domain in AI
that focuses on the interaction between computers and humans through natural
language. The ultimate goal of NLP is to enable computers to interpret,
understand, and respond to human language in a way that is both meaningful and
useful. Traditionally, tasks in this field – from sentiment analysis to language
translation – required robust datasets and specialized knowledge in machine
learning and data science to be effectively executed.

However, the rise of ChatGPT and its associated Application Programming


Interface (API) has revolutionized the NLP landscape. Thanks to its ability to
democratize NLP models, anyone, including regular users, can now generate
human-like text from prompts without having any in-depth knowledge of data
science or machine learning. For instance, whereas previously one might have
needed to design a complex model to classify text into categories, with ChatGPT, a
simple prompt can often achieve the same goal.

In essence, the advent of ChatGPT has made previously intricate NLP tasks more
accessible and user-friendly, bridging the gap between advanced technology and
the general public.
Programmers and developers are taking note, integrating GPT’s power into their
own applications to make them intelligent. In fact, many well-funded start-ups
(Typeface, Jasper AI, Copy.ai) have ChatGPT and other Large Language Models
(LLMs) as the basis of their product, whether it’s summarizing text, finding
information, or creating a chatbot. This requires a fundamental understanding of
the OpenAI API and how to use it to build intelligent applications, which is where
we’ll begin.

This starts with the basics, which involves creating an OpenAI account, accessing
the API Playground, and making API requests.

In this chapter, we will cover the following recipes:


Setting up your OpenAI Playground environment

Running a completion request in the OpenAI Playground

Using the System Message in the OpenAI Playground

Using the Chat Log to modify the model’s behavior

Making OpenAI API requests with Postman

Technical requirements
This chapter requires you to have access to the OpenAI API. You can create an
account and register for access at https://platform.openai.com/overview.

Setting up your OpenAI Playground


environment
The OpenAI Playground is an interactive web-based interface designed to allow
users to experiment with OpenAI’s language models, including ChatGPT. It’s a
place where you can learn about the capabilities of these models by entering
prompts and seeing the responses generated in real time. This platform acts as a
sandbox where developers, researchers, and curious individuals alike can
experiment, learn, and even prototype their ideas.
In the Playground, you have the freedom to engage in a wide range of activities.
You can test out different versions of the AI models, experimenting with various
prompts to see how the model responds, and you can play around with different
parameters to influence the responses generated. It provides a real-time glimpse
into how these powerful AI models think, react, and create based on your input.

Getting ready
Before you start, you need to create an OpenAI Platform account.

Navigate to https://platform.openai.com/ and sign in to your OpenAI account. If


you do not have an account, you can sign up for free with an email address.
Alternatively, you can log in to OpenAI with a valid Google, Microsoft, or Apple
account. Follow the instructions to complete the creation of your account. You may
need to verify your identity with a valid phone number.

How to do it…
1. After you have successfully logged in, navigate to Profile in the top right-hand menu, select
Personal, and then select Usage from the left-hand side menu. Alternatively, you can
navigate to https://platform.openai.com/account/usage after logging in. This page shows the
usage of your API, but more importantly, it shows you how many credits you have available.

2. Normally, OpenAI provides you a $5 credit with a new account, which you should be able to
see under the Free Trial Usage section of the page. If you do have credits, proceed to step
4. If, however, you do not have any credits, you will need to upgrade and set up a paid
account.

3. You need not set up a paid account if you have received free credits. If you run out of free
credits, however, here is how you can set up a paid account: select Billing from the left-hand
side menu and then select Overview. Then, select the Set up paid account button. You will
be prompted to enter your payment details and set a dollar threshold, which can be set to any
level of spend that you are comfortable with. Note that the amount of credits required to
collectively execute every single recipe contained in this book is not likely to exceed $5.

4. After you have created an OpenAI Platform account, you should be able to access the
Playground by selecting Playground from the top menu bar, or by navigating to
https://platform.openai.com/playground.
How it works…
The OpenAI Playground interface is, in my experience, clean, intuitive, and
designed to provide users easy access to OpenAI’s powerful language models. The
Playground is an excellent place to learn how the models perform under different
settings, allowing you to experiment with parameters such as temperature and
max tokens, which influence the randomness and length of the outputs
respectively. The changes you make are instantly reflected in the model’s
responses, offering immediate feedback.

As shown in Figure 1.1, the Playground consists of three sections: the System
Message, the Chat Log, and the Parameters. You will learn more about these three
features in the Running a completion request in the OpenAI Playground recipe.

Figure 1.1 – The OpenAI Playground

Now, your Playground is set up and ready to be used. You can use it to run
completion requests and see how varying your prompts and parameters affect the
response from OpenAI.

Running a completion request in the


OpenAI Playground
In this recipe, we will actually put the Playground in action and execute a
completion request from OpenAI. Here, you will see the power of the OpenAI API
and how it can be used to provide completions for virtually any prompt.

Getting ready
Ensure you have an OpenAI Platform account with available usage credits. If you
don’t, please follow the Setting up your OpenAI Playground environment recipe.
All the recipes in this chapter will have this same requirement.

How to do it…
Let’s go ahead and start testing the model with the Playground. Let’s create an
assistant that writes marketing slogans:
1. Navigate to the OpenAI Playground.

2. In the System Message, type in the following: You are an assistant that creates
marketing slogans based on descriptions of companies. Here, we are clearly
instructing the model of its role and context.

3. In the Chat Log, populate the USER message with the following: A company that writes
engaging mystery novels.

4. Select the Submit button on the bottom of the page.

5. You should now see a completion response from OpenAI. In my case (Figure 1.2), the
response is as follows:

Unlock the Thrilling Pages of Suspense with Our Captivating Mystery


Novels!
Random documents with unrelated
content Scribd suggests to you:
Ja posetiivin soittaja ontui etummaisena muiden seuratessa ja äiti
huusi:

— Tine, Tine, täällä on posetiivin soittaja.

Mies alkoi soittaa keskellä pihaa, mutta äiti työnsi hänet syrjään
sanoen:

— Saanko minä.

Ja lehmuksen alla alkoi hän itse vääntää nauraen täyttä kurkkua,


sillä hän soitti kenraali Bertramin jäähyväislaulua.

Keittiössä juostiin ikkunoihin, ja miehet ilmestyivät pesutuvan


ovelle.

Jens-renki pisti päänsä ulos tallin ovesta.

— Nyt rouva itse vääntää posetiivia, sanoi hän.

Kenraali Bertramin jäähyväislaulu oli lopussa ja äiti väänsi yhä.

— Nyt tanssimaan, sanoi hän, tämä on polkkaa.

Tine, Tine, huusi hän, tanssikaa nyt.

Palvelustytöt juoksivat ulos, Tine etummaisena, ja alkoivat tanssia,


hikoillen ja avopäin, keskellä pihaa, posetiivin ympäri: Pesu-Marenin
hame ulottui vähän polvien yli.

— Tanssimaan, tanssimaan, huusi äiti miehille.

Mutta isäntärenki oli ainoa, joka uskalsi; hän hiipaili vähän


hämillään alas, otti puukengät jalastaan ennenkuin pyysi Tineä
tanssimaan ja pyörähteli sitten sukkasillaan nurmikolla.

— Hei, hei huusi äiti, tästä tulee talkootanssit.

Hän väänsi posetiivia niin että hikihelmet kihoilivat valkeilla


kasvoilla.

Lapset juoksivat kirkuen posetiivin ympäri.

— Tanssikaa, tanssikaa, huusi äiti, ja lapset juoksivat. Mutta


ontuva posetiivin soittaja seisoi rauhallisena ja haisteli tuoreen leivän
tuoksua.

Isäntärenki oli pyörittänyt Tineä niin että karttuunihame heilui —


sen alla ei liikoja ollut — ja nyt hän kumarsi jäykästi posetiivin
edessä.

— Tine, väännä, huusi äiti.

Tine juoksi posetiivia vääntämään ja äiti pyöri kaikkien lasten


huutaessa:

— Äiti tanssii, äiti tanssii.

Sukkasillaan tanssien piteli isäntärenki niin varovaisesti hentoa


äitiä kuin olisi hän ollut posliinia.

— Nyt en jaksa enää, sanoi äiti.

Mutta Tine väänsi vääntämistään, ja äiti sanoi:

— Jollei Fritz olisi kotona, päästäisimme hevoset ulos.

Hänen täytyi saada hevoset ulos.


— Tine, huomennahan on syntymäpäiväni, ei hän silloin raski
mitään sanoa.

Hän huusi renkiä:

— Jens, Jens.

Jens tuli ontuen.

— Jens, sanoi äiti, ja äkkiä hän kuiskasi: laskekaa hevoset ulos.

Pihalla tanssivat palvelijat, ja lapset kirkuivat villiintyen omasta


meluamisestaan.

— Siinä ne ovat, sanoi äiti.

Molemmat ruskeat laukkasivat ulos tallinovesta.

Perästä tuli "Beauty".

— Pelottakaa niitä, pelottakaa niitä, sanoi äiti ja heilutti itse


nenäliinaansa.

Hevoset kirmasivat ja tytöt tanssivat.

— Varokaa, varokaa, huusi äiti.

Melu oli ylimmillään.

- Stella, Stella, kuului äkkiä ikkunasta.

— Herra Jumala, Fritz, sanoi äiti kangistuen.

Tytöt katosivat samassa, kuin olisi maa niellyt heidät.


— Fritz, sanoi äiti änkyttäen, en ymmärrä, kuinka kaikki on käynyt.

Mutta isä sulki ikkunansa, ja äiti sanoi hiljaa Tinelle, kohottaen


olkapäitään kuin olisi nauttinut jostain hyvästä:

— Nyt annetaan miehelle kahvia.

— Herra Jumala, Tine, posetiivin soittajat tietävät tuhansia juttuja.

Posetiivin soittaja tuli väentupaan, ja äiti kuunteli hänen puhettaan


tuntimääriä.

— Entä sitten, posetiivin soittaja, entä sitten, sanoi äiti ja siirtyi yhä
lähemmäksi ukkoa penkillä.

Posetiivin soittaja kertoi juttuja maailmankiertomatkoiltaan.

— Lähtiessään sai hän taalerin.

— Tine, sanoi äiti innostuneena: se mies osaa valehdella. Hänen


juttunsa ovat samanlaisia kuin lukukirjan kertomus
neekerikuningattaresta, joka antoi polkea vatsaansa, jotta ruoka
paremmin sulaisi.

— Sen olen lukenut saksalaisesta lukukirjasta ja se on tosi, vaikka


Fritz väittää minun valehtelevan.

— Mutta tule nyt, sanoi hän. Nyt lähdetään.

He kulkivat puutarhan läpi.

Ilta oli tyyni ja valoisa, ja lammikko lepäsi peilikirkkaana.


Ensimäiset ruusut tuoksuivat pensaissa.
— Kuule, kuinka kaikki on hiljaa, sanoi äiti.

— Niin on.

Niityiltä kohosi sumu. Kaukana häämöitti metsä.

— Tine, sanoi äiti, täällä tahtoisin mielelläni kuolla. Ja nojaten


valkeita pylväitä vasten ruusujen langetessa hänen hiuksilleen
katseli hän lammikkoa, niittyä ja metsää.

— Minkä tähden on elämän kehys niin kaunis, sanoi hän. Ja


väsyneenä vaipui hänen kaunis kätensä alas.

*****

Aamulla saapui Tine viideltä.

Ensi työkseen hän lukitsi äidin huoneen oven. Hän kiersi avainta
kaksi kertaa molemmissa ovissa — vaatekammionkin ovessa.

Sillä kolme vuotta sitten oli äiti syntymäpäivänään hiipinyt


vaatekammion läpi ullakolle, ja äkkiä seisonut keskellä huvimajaa: —
Herra Jumala, siinä on rouva, oli Tine sanonut: — ja yöpaitasillaan.

Mutta äiti oli nähnyt kaikki lahjansa, ennenkuin pöytä oli valmis.

Lapsia ei kukaan voinut pitää vuoteissa kuuden jälkeen.

— He tahtoivat nousta.

Äidilläkään ei ollut rauhaa vuoteessaan. Hän hypähti lattialle


paljain jaloin ja jyskytti lukittua ovea.

— Tahdon ulos, huusi hän.


Ja hän jyskytti vielä kovemmin.

Mutta Tinellä ei ollut vielä pöytä valmiina.

Sille oli levitetty lumivalkea liina; ruusuista oli tehty S kirjaimia, ja S


oli puhallettu syntymäpäivärinkilälle.

Se puhallettiin paperitötteröstä, joka oli täynnä vettä ja valkoista


sokeria.

Tine seisoi keittiössä puhaltaen taideteosta, kaikki lapset ympärillä


katsomassa.

Kaikkien suut olivat ammollaan:

— Nyt, sanoi Tine, nyt minä puhallan.

Ja naama punaisena hän puhalsi S kirjaimen rinkilälle lasten


tuijottaessa.

— No, sanoi Tine, nyt tulee kiemura.

Ja hän puhalsi taas.

Äiti jyskytti jyskyttämistään ovea:

— Tine, Tine.

— Niin, niin, huusi Tine juosten rinkilää viemään, pysykää vain


siellä.

Palvelustytöt juoksivat huvimajaan punaisiksi maalatut


kukkaruukut käsissä.
He lahjoittivat rouvalle syntymäpäivälahjaksi joka vuosi
kultalekkoja, jotka olivat kasvaneet palvelijoiden huoneessa
ylenpalttisessa yölämmössä.

Kaikki lahjat olivat paikoillaan pöydällä, ja Tine ja lapset


tarkastelivat komeutta.

Isä tuli pensasaidan viertä kulkien.

Hiljaa pani hän lahjansa pöydälle, puoleksi salaa, ja katosi.

— Nyt haetaan rouva, sanoi Tine.

Lapset syöksyivät taloon, ylös portaita.

— Äiti, äiti — nyt —

Ja Tine avasi oven.

Valkoisissa mekoissaan juoksivat lapset äidin edellä vihreiden


pensasten välillä, valkoista huvimajaa kohden.

— Äiti, äiti, kuului lakkaamatta.

— Äiti, äiti, huusivat he, kunnes saapuivat valkealle huvimajalle.

Ja kaikki lapset tempasivat lahjansa pöydältä ja antoivat ne äidille,


kädet ylöspäin ojennettuina.

— Äiti, äiti, tämä on minulta.

— Äiti, äiti, ei mutta minulta.

Ja varpaillaan he seisoivat voidakseen paremmin ojentaa.


Hetken seisoi äiti valkoisena, valkeiden lastensa ympäröimänä.
Hän katseli niin kauas yli kesäisten niittyjen. Kaikki oli valoa: taivas,
ilma ja maa.

— Kuinka ihana päivä, sanoi äiti.

Ja hän hymyili.

Yht’äkkiä hän kohautti kättään. — Tyras nuoleskeli hänen


sormiaan ja paneutui makaamaan hänen jalkojensa juureen.

— Sinäkö siellä, sanoi hän.

Ja auringonpaisteessa seisoi hän ruusujen keskellä, lasten


ympäröimänä,
Tyras jalkojen juuressa maaten.

Palvelustytöt tulivat, ja miehet saappaat jaloissa.

He tulivat kuin hiipien lammikon ympäri, pitkässä jonossa, niskat ja


polvet koukussa — he näyttivät siltä kuin menisivät uhrattaviksi. Äiti
otti heitä kädestä yksitellen.

Palvelustytöt vilkuilivat lahjojansa ja jatkoivat matkaansa.

Takimmaisena tallusteli Jens-renki. Hänen housunsa riippuivat


takaa niin surkeasti kuin olisi hän tullut surua valittamaan.

Kaikkien lähdettyä pesi äiti kätensä lammikossa.

Tine oli mennyt suklaata hakemaan.

— Lapsikullat, juodaan se heti, niin on siitä päästy — — —


Lapset olivat juosseet pois ja hän oli yksin.

Hiljaa meni hän sisään ja avasi isän kirjeen.

Hitaasti otti hän sen esille ja luki:

— Tuntuu niin kummalliselta toivottaa sinulle onnea, mutta


toivotan sinulle parasta, mitä elämä voi antaa. Fritzisi.

Äidin pää painui jälleen.

Hän ei itsekään huomannut, että hänen kätensä vähitellen


hävittivät kukkaisnimen pöytäliinalta.

Silloin hän näki isän tulevan pensaiden luota.

— Kiitos ystäväni, sanoi hän tarttuen isän käteen. Ja hetken he


seisoivat monien lahjojen edessä — molemmat vaiti.

Sitten hiipi isä pois lehtoa kohti.

*****

Viideltä iltapäivällä saapuivat pitäjäläiset. Tine oli käynyt kotona


noutamassa lukkarinmuoria, jolla oli käsissään valkeaan pääliinaan
kääritty kaakku.

Kun Jespersenin perhe oli nähnyt lukkarin perheen sivuuttavan


pitäjänvoudin talon, lähti rouva Jespersen liikkeelle molempine
tyttärineen. — Rouva Jespersenillä oli juhlallisen tukanlaitteensa
päällä diadeemin muotoinen hattu, johon oli kiinnitetty kaksi
jäljennettyä kamelikurjensulkaa.
Stina-neidillä oli yllään musta kirjosilkkihame, josta sai sen
vaikutuksen, että tässä kehyksessä oli hän ensi kertaa mennyt ripille.
Stina-neidin puvuille oli muuten ominaista, että ne aina olivat liian
lyhyet ranteiden ja helman kohdalta. Rouvan syntymäpäivä oli —
lukuunottamatta laissa määrättyjä loma- ja juhlapäiviä — ainoa
päivä, jolloin Stina oli vapaana.

Hän lahjoitti hajuvesipullon, jonka sisällyksen äiti jälkeenpäin kaasi


kahteen pienempään pulloon ja antoi ne palvelustytöille.

Helena neiti oli valkopukuinen ja vilkas kuin nuori vuohi. Hänen


lahjansa oli käärittynä ruusunpunaiseen silkkipaperiin. Se oli
kanavakankaalle ommeltu korutyö, joka oli tarkoitettu satulasepän
kehystettäväksi.

Helena neidin lahjat lähetettiin säännöllisesti seuraavana vuonna


Sönderborgin hyväntekeväisyysmyyjäisiin arvottaviksi.

Pitäjänvoudin vaimo oli ensimmäistä kertaa ulkona pojan


kuoleman jälkeen. Hän oli juhlallinen kuin virsikirja. Aamulla hän oli
lähettänyt voiruukun.

Miesväkeä ei ollut ollenkaan.

— Fritz, sanoi äiti, syntymäpäivänäni ainakin tahdon olla


rauhassa.

— Yksi ainoa mies vaikuttaa häiritsevästi laverrukseen.

Jespersenin perhe istuutui keskelle huvimajaa, jossa rouva


Jespersen lupaa kysymättä hetken kuluttua oli tarkastellut lahjat.
Stina-neiti painoi miesmäisen suunsa äidin poskea vastaan niin
kovasti että melkein teki kipeää.

Ja hämillään mumisten jotain, joka puoleksi oli onnentoivotus,


puoleksi anteeksipyyntö, pisti hän hajuvesipullon äidin taskuun.

— Hyvä Jumala, sanoi hän, tuskin itsekään tietäen mitä puhui,


mitä onkaan elämä.

Helena neiti oli pelkkää nuorekasta levottomuutta.

Ei ollut sitä lahjaa, jota hän ei olisi viehkeästi sovitellut omaan


pukuunsa.

Lukkarin muori, joka istui Stina-neidin vieressä, kertoi, että rouva


Esbensen oli ajanut ohi Ulkeböliä kohden.

Rouva Esbensen oli kätilö.

— Tietysti Sörensenille, sanoi lukkarin muori. Minähän näin


selvästi, miten hän viimein ohi ajaessaan täytti vaununistuimen.

— Niinpä melkein.

Tämä puheenaihe huvitti kaikkia.

— Jumala varjelkoon häntä, sanoi äiti, tämä on yhdeksäs.

Kaikki puhuivat, lukuunottamatta pitäjänvoudin vaimoa, joka


mustassa vaipassaan istui suorana ja sanaakaan sanomatta tyhjensi
kolme suklaakuppia.

Lukkarin muori sanoi äkkiä kovemmalla äänellä kuin muut:


— Mutta onhan ihmeellistä, rouva Jespersen, että kullakin pitäjällä
on oma kuukautensa. Täällä on toukokuu.

Äiti, joka nautti kuin karitsa lämpimässä, nauroi ja sanoi:

— Mutta hyvä rouva Balling, mistä te sen tiedätte?

— Sehän näkyy kirkonkirjoista, sanoi lukkarinmuori. Ja hän lisäsi.

— Mutta kuolemantapauksia on enimmän marraskuussa.

Stina neiti sanoi, että hänen koulussaan olivat useimmat


syntymäpäivät joulukuussa.

Äiti rupesi puhumaan imettäjistä. Sill’aikaa sitoi Helena-neiti


korallinauhan kaulaansa ja leikki huvimajan edessä Tyraan kanssa.

Hänen monet pikkuhuudahduksensa keskeyttivät keskustelua.

— Nyt leikitään, sanoi äiti.

Ja hän hypähti pystyyn ja koetti ehättää Helena-neitiä.

— Viimeinen, viimeinen! huusi hän. Tine lensi jälestä.

— Viimeinen.

Lapset tulivat esille pensaiden takaa ja juoksivat hekin:

— Viimeinen.

Äiti juoksi etummaisena:

— Viimeinen.
He juoksivat lammikon ympäri.

Stinan hajuvesipullo löi äidin sääriä vastaan, kunnes hän sai sen
taskustaan ja asetti sen nurmikolle lammikon viereen.

— Stina mukaan, huusi äiti.

Stina tuli huvimajasta ja lähti juoksemaan Tinen jälkeen.

Äiti nauroi niin, että hänen oli pakko nojautua puun runkoa
vastaan.

Juostessaan muistutti Stina selvästi kanakauppiaan pattijalkaista


hevoskaakkia.

Äkkiä istuutui äiti nurmikolle; kaikki muut heittäytyivät hänen


viereensä.

— Nyt täytyy rantakalojen saada ruokaa, sanoi äiti.

Ja kaikki heittivät murusia lammikkoon, jossa rantakalat


uiskentelivat vilkkaina auringonpaisteessa.

Vanhukset istuivat kolmisin huvimajassa. Rouva Jespersen oli


kaikessa rauhassa tutkinut lahjoja.

Tine tarjosi viiniä ja lasit olivat ruohikossa lammen reunalla. —

Kaadapas Stina, sanoi äiti.

Stina-neiti tuli aina niin surumieliseksi juotuaan pari lasillista.

— Anna lapsillekin, sanoi äiti.


Lapset saivat kirsikkaviiniä, niin että päätä huimasi.

Mutta Stina-neiti jäi istumaan leuka käsien nojassa, ja äidin


nauraessa ja lasten juostessa — vanhin poika joi tähteet laseista —
lausui Stina-neiti hiljaa itsekseen runon vanhasta saksalaisesta
almanakasta.

— Lausu vielä, sanoi äiti.

Ja Stina-neiti lausui miehekkäällä äänellään — se muistutti


messua.

Pitäjänvoudin vaimo oli noussut seisomaan.

Vaieten antoi hän kättä hyvästiksi ja äiti saattoi häntä


pensasaidalle.

Muut vieraat seurasivat, ja äiti sanoi Tinelle:

— Vie nuo pois.

Hän näytti laseja ja lautasia ja vaiti hän istuutui huvimajan


perimmäiseen soppeen.

— Vie kaikki nuokin, sanoi hän.

Hän tarkoitti lahjoja, ja äänestä kuului, kuin olisi niiden pelkkä


näkeminen koskenut kipeästi hänen silmiinsä.

Tine liikuskeli huvimajassa korjaten kaikki pois.

Lasten äänet kuuluivat pihasta…

Tinen palatessa istui äiti lukien vanhaa kirjaa.


Tine istuutui hiljaa hänen viereensä.

— Mitä luette? kysyi hän.

— Runoa, sanoi äiti.

Äiti käänsi kirjan lehteä, ja, kuin itsekseen lukien lausui hän runon
uudelleen:

Omituista näin kerran unta: Erämaata ma kuljin. Ylt'ympäri


hiekkaa pelkkää, ei muuta kuin paljasta hiekkaa. Mut silmäni
säikkyvä näyn peljättävän näki silloin. Erämaan petojen
loputon tuli saattue silloin esiin. Jalopeurat valkea-hampaat
edell' astuivat; seurasi sitten suku tiikerin täplikästaljan ja
pantterien. Arat astui lopuks raatoja rakastavaiset hyeenat
saattueen päässä.

Oli ihmisten viettejä ne,


erämaata jotk' etsien astui.

Uni muotoa sitten muutti.


Kamaralla maan mahtavan seisoin
ma yksin.
Mut maapallo oli tuo maa.
Ja pimeys ainainen
maan kaiken vaippaansa kattoi —
mut pimeydessä
kohos risti niin suuri
kuin ois käsivarret sen valtavat
sylihinsä sulkeneet maan sekä taivaan.
Oli hiljaista.
Vain tuolloin tällöin
pisara putos ristiltä alas,
ja taas oli hiljaista kaikki
siks kuin putos pisara toinen,
ja kaikki taas mykistyi
siks kuin veripisara seuraava putos.
Oli vertasi se,
sa ristillä riippuva ihmiskunta.

Äiti sulki kirjan.

Nojaten päätänsä huvimajan seinää vastaan, hän tuijotti mykkänä


ja valkeana kesäillan ihanuutta.

— Tine, sanoi hän äkkiä, ja Tine vavahti, sillä äiti oli sanonut
hänen nimensä melkein kuin apua anova.

Mutta äiti jäi istumaan paikoilleen ja kuiskasi itsekseen muutamia


sanoja, joita Tine ei ymmärtänyt:

"Ei ole mailmaa Veronan ulkopuolella", sanoi hän.

Ja hän vaikeni taas.

Hetken perästä hän sanoi:

— Tine, on aivan totta — jos joku voisi luoda katseen sieluuni,


niinkuin ikkunanruudusta katsellaan huoneeseen, ei hän siellä
löytäisi kaikkien tavaroiden seasta yhtäkään halua, ei ainoatakaan
toivetta, ei unelman varjoa.

— Silloinhan olisi parempi kuolla.


— Kuolema, Tine, ei olekaan raskainta — — — on paljon
raskaampaa joka päivä koettaa elää…

Hän jäi istumaan vaiti, pitäen käsiään ristissä polvien ympäri; ja


kuten äsken liikkuivat hänen huulensa kuiskaten sanoja, joita Tine ei
tuntenut:

Ah, kammiossansa mykäss', äänettömässä mun syämeni


lepää — ah, kuolleena lepää.

Ei yksikään itke
mun syäntäni kylmää:
sitä ainoastaan
näet yksi vain lempi.

Mut hän, joka kuoli,


sydämensä kun kuoli,
ei itkeä voi
sydäntään elotonta.

Ah kammiossansa mykäss', äänettömässä mun sydämeni


lepää — ah kuolleena lepää.

*****

Iltasin ei enää laulettu, eivätkä lapset enää saaneet kuten ennen


tanssia arkihuoneessa paitasillaan ennen maata menoaan.

Tädit olivat saapuneet.

He käyttivät tätä paikkaa jälkiparantolana kylpypaikasta


palattuaan.
He puhuivat matalalla äänellä, istuivat suorina kuin kynttilät,
käsissä heillä oli puolihansikkaat.

Heillä oli alituinen huoli ilmasta ja he kulettivat aina sateenvarjoa


mukanaan peläten sadetta.

— Hyvä ystävä, sanoivat he äidille, ei tarvita muuta, kuin että


jalassa on märkä sukka puoli tuntia, niin saa yskän, joka kestää
viikkoja.

Äiti, joka parantola-aikana oli kalpeana pelosta, myöntyi kaikkeen


ja käytti musliinipukuja. Koko päivänä ei hänen päässään ollut kuin
yksi ainoa ajatus, etteivät lapset taas pääsisi saattamaan
epäjärjestystä tätirykmentin kalosseihin.

Tinen hän näki aamulla.

Oli kuin olisi tehty sellainen sopimus, että Tine katoasi talosta
tätikautena. Äiti ja hän tapasivat toisensa melkein kuin kaksi
salakuljettajaa. Mutta aamulla täytyi Tinen tulla äitiä ajamaan
vuoteesta.

Tätien parantolasäännöt vaativat, että he nousisivat aamulla kello


seitsemältä, ja he olivat täsmällisiä kuin tuomiokirkon kello.

- Nyt teidän täytyy nousta, sanoi Tine.

- Niin, kultaseni — — — paljonko kello on

Äiti rakasti vuodettaan ja vapauttaan ollessaan yöpaitasillaan.

— Mutta nyt teidän on noustava.

— Niin — — —
Vihdoin hän pääsi vuoteesta.

Tullessaan alas tätien luo oli hänellä edessään suuri valkoinen


esiliina, ja näytti siltä kuin hän olisi askarrellut talossaan jo kello
viidestä, jolloin voi kirnuttiin.

Molemmat tädit istuivat, selät tavattoman suorina, kummallakin


puolella pöytää puutarhasalissa ja odottivat teekuppiaan.
Aamukävelylle lähtiessään tekivät he erittäin matkavalmiin
vaikutuksen. Hameen helmoja kannatti erikoinen järjestelmä
hakasia, ja päässä oli hatut, joiden suuruus oli verrattava koreihin,
joissa postissa lähetetään hautaseppeleitä.

Näitä hirviöitä koristivat silmien yli riippuvat pitsit.

- Herra Jumala, he sanoivat pitsejä tarkoittaen, ennen kaikkea


täytyy ajatella silmien suojaamista.

Äiti sanoi:

— Näyttää siltä, kuin olisi aikomuksenne marssia Jerusalemiin.

He eivät kävelleet oikeassa puutarhassa sammakkojen takia, joita


he inhosivat.

— Niitähän vilisee joka paikassa, sitäpaitsi ne hyppivät… sehän


on melkein kamalampaa kuin viime vuonna.

Sitäpaitsi oli tie vihannestarhan läpi, kun sen oli kulkenut kuusi
kertaa edes-takaisin, juuri heidän määränsä. Kävellessään he eivät
puhuneet.
— Geneven lääkäri on oikeassa, sanoi Bothilde täti, ei pidä puhua.
Pitää kävellä ja antaa hermojensa levätä.

Joka toisen käännöksen kohdalla söivät he pienen suklaakakun.

— Sveitsiläinen suklaa on siitä mainiota, että se antaa voimia,


viemättä ruokahalua. Meidän kotoinen suklaamme sitävastoin on,
kuin saisi möhkäleitä suuhunsa.

Kotiin palattuaan rupesivat tädit levolle.

He nukkuivat kaksi tuntia villavaippoihin käärittyinä.

— Hyvä ystävä, sano Bothilde täti, villa on villaa. Ranskalaiset,


jotka tahtovat säilyä kuntokykyisinä, nukkuvat villapatjoilla.

— Niiden alla on tietysti jousipohja, lopetti hän puheensa.

— Hyvä ystävä, sanoi Anna täti, ranskalaiset ovat ranskalaisia.

Äidin tuskat kasvoivat kasvamistaan.

Ateriat olivat hänen kauheimmat hetkensä. Ei hän voinut sanoa,


että lapset istuivat moitteettomasti pöydässä.

Ja pöytätavat olivat tätien erikoisala.

— Täytynee toki myöntää niiden tärkeys, sanoi Bothilde täti. Ja


ellei niitä opi lapsena, niin ei sitten milloinkaan …

— Vakuutan sinulle, että syynä siihen, ettei Storkfeldt päässyt


valtionministeriksi — tädit kutsuivat aina neuvostoministeriä
valtioministeriksi — oli hänen tapansa syödä veitsellä.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like