To get the most out of this book
To fully benefit from this book, you should have:
- A solid understanding of Python programming
- Familiarity with basic machine learning concepts
- Experience with software development and application architectures
- Access to a development environment capable of running Python and installing necessary libraries
The chapters contain both theoretical explanations and practical code examples. To run the code in the book, you can follow these steps:
- Clone the GitHub repository associated with this book.
- Set up a Python environment with the required dependencies (listed in the repository).
- Download or access the necessary generative AI models as instructed in each chapter.
- Run the provided Jupyter notebooks or Python scripts.
Alternatively, you can use cloud-based platforms that offer pre-configured environments for AI development, such as Google Colab or Amazon SageMaker, to run the examples without setting up a local environment.
Download the example code files
The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/Generative-AI-Integration-Patterns-1E. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://packt.link/gbp/9781835887608.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter/X handles. For example: “Mount the downloaded WebStorm-10*.dmg
disk image file as another disk in your system.”
A block of code is set as follows:
generation_config = {
"max_output_tokens": 8192,
"temperature": 0,
"top_p": 0.95,
}
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
responses = model.generate_content(
[prompt],
generation_config=generation_config,
safety_settings=safety_settings,
stream=False,
)
Any command-line input or output is written as follows:
# cp /usr/src/asterisk-addons/configs/cdr_mysql.conf.sample
/etc/asterisk/cdr_mysql.conf
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: “Select System info from the Administration panel.”
Warnings or important notes appear like this.
Tips and tricks appear like this.