2 options
OpenAI GPT for Python Developers : The Art and Science of Building AI-Powered Apps with GPT-4, Whisper, Weaviate, and Beyond / Aymen El Amri.
- Format:
- Book
- Author/Creator:
- El Amri, Aymen, author.
- Language:
- English
- Subjects (All):
- ChatGPT.
- Artificial intelligence--Computer programs.
- Artificial intelligence.
- Natural language processing (Computer science).
- Python (Computer program language).
- Physical Description:
- 1 online resource (334 pages)
- Edition:
- First edition.
- Place of Publication:
- Paris, France : FAUN, [2024]
- System Details:
- Mode of access: World Wide Web.
- Biography/History:
- El Amri Aymen: Aymen El Amri is a polymath software engineer, entrepreneur, and author with extensive experience in various technology fields, including DevOps & Cloud Native, Cloud Architecture, Python, NLP, and more. Aymen has authored multiple books and courses and provided training that has benefited thousands of developers and software engineers. His passion for teaching is evident in his practical approach, which simplifies complex concepts into understandable language and offers real-world examples that resonate with his audience. Aymen is the founder of several projects, including eralabs, FAUN, and MarketToDev, and he has been featured in several reputable publications.
- Summary:
- “OpenAI GPT for Python Developers” is meticulously crafted to provide Python developers with a deep dive into the mechanics and applications of GPT technology, beginning with a captivating narrative on the evolution of OpenAI and the fundamental workings of GPT models. As readers progress, they will be expertly guided through the essential steps of setting up a development environment tailored for AI innovations, coupled with insightful advice on selecting the most appropriate GPT model to suit specific project needs. The guide progresses into practical tutorials that cover the implementation of chat completions and the art of prompt engineering, providing a solid foundation in harnessing the capabilities of GPT for generating human-like text responses. Practical applications are further expanded with discussions on the creation of autonomous AI-to-AI dialogues, the development of AI avatars, and the strategic use of AI in interactive applications. In addition to technical skills, this book addresses the ethical implications and prospects of AI technologies, encouraging a holistic view of AI development. The guide is enriched with detailed examples, step-by-step tutorials, and comprehensive explanations that illuminate the theoretical aspects and emphasize practical implementation.
- Contents:
- Intro
- Preface
- About the Author
- The Story of OpenAI and ChatGPT
- About This Guide
- The Companion Toolkit
- Stay Connected
- How Does GPT Work?
- Setting Up the Development Environment
- Notes
- Installing Python, pip, and a Virtual Development Environment
- Obtain Your OpenAI API Keys
- Install the Official Python Bindings
- Test our API Keys
- Understanding the Available Models and Which One to Use
- OpenAI Available Models and Important Considerations
- Which Model to Use?
- OpenAI Model Series
- GPT-4 Series
- GPT-3.5 Series
- InstructGPT-3 Series
- Base GPT-3 Series
- Codex Series
- Content Filter
- DALL-E Series
- TTS Series
- Whisper Model
- Embedding Model
- OpenAI Models and Pricing
- What's Next?
- Using GPT Chat Completions
- An Introductory Example
- System, User, and Assistant Roles
- The System Role
- The User Role
- The Assistant Role
- Few-shot Learning with Chat Completions
- Formatting the Output
- Controlling the Output's Token Count
- Controlling When the Completion Output Stops
- Temperature and Hallucination
- Sampling with Top_p
- Temperature vs Top_p: What's the Difference? Which One Should I Use?
- Streaming the API Response
- Controlling Repetitiveness: Frequency and Presence Penalties
- Frequency vs. Presence Penalty
- Controlling the Number of Results from the API
- Conclusion
- Advanced Examples and Prompt Engineering
- What is Prompt Engineering?
- Few Shot Learning: A Key Prompt Engineering Technique
- Overgeneration and Selection
- General Knowledge Prompting (GKP): Generating a Rap Song
- Context Stuffing: Is Apple a Fruit or a Company?
- Dynamic Max Tokens
- Creating an Interactive CLI-Based Assistant
- Embedding
- What is an Embedding?
- Use Cases: From Modern Search Engines to Self-Driving Cars.
- Tesla: How Embeddings Are Used in Self-Driving Cars
- Kalendar AI: The Power of Embeddings in Sales Outreach
- Notion: Enhanced Search Capabilities
- DALL·E 2: Text-to-Image Conversion
- Understanding Text Embedding
- Embeddings for Multiple Inputs
- Use case: Semantic Search
- Cosine Similarity: A Deeper Look
- Semantic Search and OpenAI's Text Embeddings
- Behind the Scenes: How Embeddings Work
- Advanced Embedding Examples
- Predicting Your Preferred Coffee
- Creating a "Fuzzier" Search
- Predicting News Category: Zero-Shot Classification with Embeddings
- Evaluating the Accuracy of a Zero-Shot Classifier
- Precision in Zero-Shot Classifier Applications: Examples
- Fine-Tuning and Best Practices
- Few-Shot Learning
- Enhancing Few-Shot Learning
- Practical Application of Fine-Tuning
- Fine-Tuning Best Practices
- Choosing the Model
- Validating the Dataset
- Token Limit
- Dataset Size
- Testing and Improving Training (Hyperparameters)
- Epochs
- Learning Rate Multiplier
- Batch Size
- Consider Estimated Costs
- Dataset Quality
- Combining Fine-Tuning with Other Techniques
- Experiment and Learn
- Use a Validation Set
- Test the Model
- Analyze the Results
- Advanced Fine-Tuning: Mental Health Coach
- Dataset Used in the Example
- Preparing the Data
- Using the Model in Real-World Applications and Challenges
- Context &
- Memory: Making AI More Real
- The Problem: No Memory
- No Context = Chaos of Randomness and Confusion
- History = Context
- The Problem with Carrying Over History
- Last In First Out (LIFO) Memory
- The Problem with Last In, First Out Memory
- Selective Context
- Using a Vector Database with OpenAI
- Introduction
- What is a Vector Database?
- Example 1: Using Weaviate to Make Our Model More Context-Aware
- Example 2: Using Weaviate and OpenAI in Semantic Search.
- Example 3: Using Weaviate and OpenAI for Generative Search
- Speech Recognition and Translation Using Whisper
- What is Whisper?
- How to Get Started?
- Transcribe and Translate
- Using Whisper SDK in Python
- Using OpenAI Speech to Text API
- Transcription API
- Translation API
- Improving Whisper Transcription
- Cleaning the Audio
- Using the Prompt Parameter
- Post-Processing the Transcription
- Text-to-Speech with OpenAI TTS Models
- Autonomous AI-to-AI Discussion Using OpenAI, Weaviate, and AI Avatars
- Generating the Audio Files
- Using AI Avatar Models
- Afterword.
- Notes:
- Description based upon print version of record.
- Combining Fine-Tuning with Other Techniques
- Includes bibliographical references and index.
- Description based on publisher supplied metadata and other sources.
- Description based on print version record.
- ISBN:
- 9781836202400
- 1836202407
- OCLC:
- 1435753617
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.