diff --git a/examples/gpt4o/data/keynote_recap.mp3 b/examples/gpt4o/data/keynote_recap.mp3 new file mode 100644 index 0000000..4153fbc Binary files /dev/null and b/examples/gpt4o/data/keynote_recap.mp3 differ diff --git a/examples/gpt4o/introduction_to_gpt4o.ipynb b/examples/gpt4o/introduction_to_gpt4o.ipynb index 6a16a8e..5ba9e11 100644 --- a/examples/gpt4o/introduction_to_gpt4o.ipynb +++ b/examples/gpt4o/introduction_to_gpt4o.ipynb @@ -62,7 +62,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -76,7 +76,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -113,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 5, "metadata": {}, "outputs": [ { @@ -146,43 +146,38 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 6, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "To find the area of the triangle, you can use the formula:\n", - "\n", - "\\[\n", - "\\text{Area} = \\frac{1}{2} \\times \\text{base} \\times \\text{height}\n", - "\\]\n", - "\n", - "In the triangle you provided:\n", - "\n", - "- The base is \\(9\\) (the length at the bottom).\n", - "- The height is \\(5\\) (the vertical line from the top vertex to the base).\n", - "\n", - "Now, plug in the values:\n", - "\n", - "\\[\n", - "\\text{Area} = \\frac{1}{2} \\times 9 \\times 5\n", - "\\]\n", - "\n", - "Calculating this gives:\n", - "\n", - "\\[\n", - "\\text{Area} = \\frac{1}{2} \\times 45 = 22.5\n", - "\\]\n", - "\n", - "So, the area of the triangle is **22.5 square units**." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "To find the area of the triangle, you can use the formula:\n", + "\n", + "\\[\n", + "\\text{Area} = \\frac{1}{2} \\times \\text{base} \\times \\text{height}\n", + "\\]\n", + "\n", + "In the triangle you provided:\n", + "\n", + "- The base is \\(9\\) (the length at the bottom).\n", + "- The height is \\(5\\) (the vertical line from the top vertex to the base).\n", + "\n", + "Now, plug in the values:\n", + "\n", + "\\[\n", + "\\text{Area} = \\frac{1}{2} \\times 9 \\times 5\n", + "\\]\n", + "\n", + "Calculating this:\n", + "\n", + "\\[\n", + "\\text{Area} = \\frac{1}{2} \\times 45 = 22.5\n", + "\\]\n", + "\n", + "Thus, the area of the triangle is **22.5 square units**.\n" + ] } ], "source": [ @@ -207,7 +202,7 @@ " temperature=0.0,\n", ")\n", "\n", - "display(Markdown(response.choices[0].message.content))" + "print(response.choices[0].message.content)" ] }, { @@ -219,37 +214,38 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "It seems there was an error processing the image, so I can't see the triangle or its dimensions. However, I can help you calculate the area of a triangle if you provide the base and height or the lengths of the sides.\n", - "\n", - "The area \\( A \\) of a triangle can be calculated using the formula:\n", - "\n", - "1. **Using base and height**:\n", - " \\[\n", - " A = \\frac{1}{2} \\times \\text{base} \\times \\text{height}\n", - " \\]\n", - "\n", - "2. **Using Heron's formula** (if you know the lengths of all three sides \\( a, b, c \\)):\n", - " \\[\n", - " s = \\frac{a + b + c}{2} \\quad \\text{(semi-perimeter)}\n", - " \\]\n", - " \\[\n", - " A = \\sqrt{s(s-a)(s-b)(s-c)}\n", - " \\]\n", - "\n", - "Please provide the necessary dimensions, and I'll help you calculate the area!" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "To find the area of the triangle, you can use the formula:\n", + "\n", + "\\[\n", + "\\text{Area} = \\frac{1}{2} \\times \\text{base} \\times \\text{height}\n", + "\\]\n", + "\n", + "In the triangle you provided:\n", + "\n", + "- The base is \\(9\\) (the length at the bottom).\n", + "- The height is \\(5\\) (the vertical line from the top vertex to the base).\n", + "\n", + "Now, plug in the values:\n", + "\n", + "\\[\n", + "\\text{Area} = \\frac{1}{2} \\times 9 \\times 5\n", + "\\]\n", + "\n", + "Calculating this gives:\n", + "\n", + "\\[\n", + "\\text{Area} = \\frac{1}{2} \\times 45 = 22.5\n", + "\\]\n", + "\n", + "Thus, the area of the triangle is **22.5 square units**.\n" + ] } ], "source": [ @@ -267,7 +263,7 @@ " temperature=0.0,\n", ")\n", "\n", - "display(Markdown(response.choices[0].message.content))" + "print(response.choices[0].message.content)" ] }, { @@ -312,7 +308,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 9, "metadata": {}, "outputs": [], "source": [ @@ -327,7 +323,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -400,7 +396,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -422,7 +418,7 @@ "text/html": [ "\n", " \n", " " @@ -431,7 +427,7 @@ "" ] }, - "execution_count": 9, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -463,54 +459,48 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 12, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "# OpenAI Dev Day Summary\n", - "\n", - "## Overview\n", - "The video captures highlights from OpenAI's Dev Day, showcasing new advancements and features in AI technology, particularly focusing on the latest updates to their models and tools.\n", - "\n", - "## Key Highlights\n", - "\n", - "### Event Introduction\n", - "- The event is branded as \"OpenAI Dev Day,\" setting the stage for discussions on AI advancements.\n", - "\n", - "### Keynote Recap\n", - "- The keynote features a recap of significant updates and innovations in OpenAI's offerings.\n", - "\n", - "### New Features and Models\n", - "- Introduction of **GPT-4 Turbo** and **DALL-E 3**, emphasizing improvements in performance and capabilities.\n", - "- Discussion on **JSON Mode** and **Function Calling**, showcasing how these features enhance user interaction with AI.\n", - "\n", - "### Enhanced User Experience\n", - "- Presentation of new functionalities that allow for better control and expanded knowledge in AI interactions.\n", - "- Emphasis on **context length** and **more control** over AI responses.\n", - "\n", - "### Pricing and Efficiency\n", - "- Announcement of pricing structures for GPT-4 Turbo, highlighting cost-effectiveness with reduced token usage.\n", - "\n", - "### Custom Models\n", - "- Introduction of custom models that allow developers to tailor AI functionalities to specific needs.\n", - "\n", - "### Community Engagement\n", - "- Encouragement for developers to build applications using natural language, fostering a collaborative environment.\n", - "\n", - "### Closing Remarks\n", - "- The event concludes with a call to action for developers to engage with OpenAI's tools and contribute to the AI ecosystem.\n", - "\n", - "## Conclusion\n", - "OpenAI Dev Day serves as a platform for unveiling new technologies and fostering community engagement, aiming to empower developers with advanced AI tools and capabilities." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "# OpenAI Dev Day Summary\n", + "\n", + "## Overview\n", + "The video captures highlights from OpenAI's Dev Day, showcasing new advancements and features in AI technology, particularly focusing on the latest developments in the GPT-4 model and its applications.\n", + "\n", + "## Key Highlights\n", + "\n", + "### Event Introduction\n", + "- The event is branded as \"OpenAI Dev Day,\" setting the stage for discussions on AI advancements.\n", + "\n", + "### Keynote Recap\n", + "- The keynote features a recap of significant updates and innovations in AI, particularly around the GPT-4 model.\n", + "\n", + "### New Features\n", + "- **GPT-4 Turbo**: Introduction of a faster and more efficient version of GPT-4, emphasizing improved performance and reduced costs.\n", + "- **DALL-E 3**: Updates on the image generation model, showcasing its capabilities and integration with other tools.\n", + "- **Custom Models**: Introduction of features allowing users to create tailored AI models for specific tasks.\n", + "\n", + "### Technical Innovations\n", + "- **Function Calling**: Demonstration of how the model can handle complex instructions and execute functions based on user queries.\n", + "- **JSON Mode**: A new feature that allows for structured data handling, enhancing the model's ability to process and respond to requests.\n", + "\n", + "### User Experience Enhancements\n", + "- **Threading and Retrieval**: New functionalities that improve how users can interact with the model, making it easier to manage conversations and retrieve information.\n", + "- **Code Interpreter**: Introduction of a tool that allows the model to execute code, expanding its utility for developers.\n", + "\n", + "### Community Engagement\n", + "- The event emphasizes community involvement, encouraging developers to explore and utilize the new features in their applications.\n", + "\n", + "### Conclusion\n", + "- The event wraps up with a call to action for developers to engage with the new tools and features, fostering innovation in AI applications.\n", + "\n", + "## Closing Remarks\n", + "The OpenAI Dev Day serves as a platform for showcasing the latest advancements in AI technology, encouraging developers to leverage these innovations for enhanced applications and user experiences.\n" + ] } ], "source": [ @@ -527,7 +517,7 @@ " ],\n", " temperature=0,\n", ")\n", - "display(Markdown(response.choices[0].message.content))" + "print(response.choices[0].message.content)" ] }, { @@ -544,57 +534,43 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 13, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "# OpenAI Dev Day Summary\n", - "\n", - "Welcome to the inaugural OpenAI Dev Day, where several exciting updates and features were announced:\n", - "\n", - "## Key Announcements\n", - "\n", - "- **Launch of GPT-4 Turbo**: \n", - " - Supports up to **128,000 tokens** of context.\n", - " - Introduces **JSON mode** for valid JSON responses.\n", - " - Improved function calling capabilities.\n", - "\n", - "- **Knowledge Retrieval**: \n", - " - New feature allowing models to access external documents and databases for enhanced knowledge.\n", - "\n", - "- **Dolly 3 and Vision Models**: \n", - " - Integration of Dolly 3, GPT-4 Turbo with Vision, and a new Text-to-Speech model into the API.\n", - "\n", - "- **Custom Models Program**: \n", - " - Collaboration with companies to create tailored models for specific use cases.\n", - "\n", - "- **Increased Rate Limits**: \n", - " - Doubling of tokens per minute for established GPT-4 customers, with options for further adjustments in API settings.\n", - "\n", - "- **Cost Efficiency**: \n", - " - GPT-4 Turbo is **3x cheaper** for prompt tokens and **2x cheaper** for completion tokens compared to GPT-4.\n", - "\n", - "- **Introduction of GPTs**: \n", - " - Tailored versions of ChatGPT for specific purposes, allowing users to create private or public GPTs easily through conversation.\n", - "\n", - "- **Upcoming GPT Store**: \n", - " - Launching later this month for sharing GPT creations.\n", - "\n", - "- **Assistance API Enhancements**: \n", - " - Features include persistent threads, built-in retrieval, a code interpreter, and improved function calling.\n", - "\n", - "## Conclusion\n", - "\n", - "OpenAI is excited about the future of AI integration and the potential for users to leverage these new tools. The team looks forward to seeing the innovative applications that will emerge from these advancements. Thank you for participating in this event!" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "# OpenAI Dev Day Summary\n", + "\n", + "On the inaugural OpenAI Dev Day, several significant updates and features were announced:\n", + "\n", + "- **Launch of GPT-4 Turbo**: This new model supports up to 128,000 tokens of context and is designed to follow instructions more effectively.\n", + " \n", + "- **JSON Mode**: A new feature that ensures the model responds with valid JSON.\n", + "\n", + "- **Function Calling**: Users can now call multiple functions simultaneously, enhancing the model's capabilities.\n", + "\n", + "- **Retrieval Feature**: This allows models to access external knowledge from documents or databases, improving their contextual understanding.\n", + "\n", + "- **Knowledge Base**: GPT-4 Turbo has knowledge up to April 2023, with plans for ongoing improvements.\n", + "\n", + "- **Dolly 3 and New Models**: The introduction of Dolly 3, GPT-4 Turbo with Vision, and a new Text-to-Speech model, all available via the API.\n", + "\n", + "- **Custom Models Program**: A new initiative where researchers collaborate with companies to create tailored models for specific use cases.\n", + "\n", + "- **Increased Rate Limits**: Established GPT-4 customers will see a doubling of tokens per minute, with options to request further changes in API settings.\n", + "\n", + "- **Cost Efficiency**: GPT-4 Turbo is significantly cheaper than its predecessor, with a 3x reduction for prompt tokens and 2x for completion tokens.\n", + "\n", + "- **Introduction of GPTs**: Tailored versions of ChatGPT designed for specific purposes, allowing users to create and share private or public GPTs easily, even without coding skills.\n", + "\n", + "- **Upcoming GPT Store**: A platform for users to share their GPT creations.\n", + "\n", + "- **Assistance API**: Features persistent threads, built-in retrieval, a code interpreter, and improved function calling to streamline user interactions.\n", + "\n", + "The event concluded with excitement about the future of AI technology and an invitation for attendees to return next year to see further advancements.\n" + ] } ], "source": [ @@ -617,7 +593,7 @@ " ],\n", " temperature=0,\n", ")\n", - "display(Markdown(response.choices[0].message.content))" + "print(response.choices[0].message.content)" ] }, { @@ -632,55 +608,51 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 14, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "# OpenAI Dev Day Summary\n", - "\n", - "## Overview\n", - "The first-ever OpenAI Dev Day introduced several exciting updates and features, primarily focusing on the launch of **GPT-4 Turbo**. This new model enhances capabilities and expands the potential for developers.\n", - "\n", - "## Key Announcements\n", - "\n", - "### 1. **GPT-4 Turbo**\n", - "- Supports up to **128,000 tokens** of context.\n", - "- Offers improved performance in following instructions and handling multiple function calls.\n", - "\n", - "### 2. **JSON Mode**\n", - "- A new feature that ensures responses are formatted in valid JSON, enhancing data handling.\n", - "\n", - "### 3. **Retrieval Feature**\n", - "- Allows models to access external knowledge from documents or databases, improving the accuracy and relevance of responses.\n", - "\n", - "### 4. **DALL·E 3 and Vision Capabilities**\n", - "- Introduction of **DALL·E 3**, **GPT-4 Turbo with Vision**, and a new **Text-to-Speech** model, all available in the API.\n", - "\n", - "### 5. **Custom Models Program**\n", - "- A new initiative where OpenAI researchers collaborate with companies to create tailored models for specific use cases.\n", - "\n", - "### 6. **Rate Limits and Pricing**\n", - "- Doubling of tokens per minute for established GPT-4 customers.\n", - "- **GPT-4 Turbo** is significantly cheaper, with a **3x reduction** in prompt tokens and **2x reduction** in completion tokens.\n", - "\n", - "### 7. **Introduction of GPTs**\n", - "- Tailored versions of ChatGPT designed for specific purposes, combining instructions, expanded knowledge, and actions.\n", - "- Users can create private or public GPTs without needing coding skills.\n", - "\n", - "### 8. **Assistance API**\n", - "- Features persistent threads, built-in retrieval, a code interpreter, and improved function calling, making it easier for developers to manage conversations and data.\n", - "\n", - "## Conclusion\n", - "The event highlighted OpenAI's commitment to enhancing AI capabilities and accessibility for developers. The advancements presented are expected to empower users to create innovative applications and solutions. OpenAI looks forward to future developments and encourages ongoing collaboration with the developer community." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "# OpenAI Dev Day Summary\n", + "\n", + "## Overview\n", + "The first-ever OpenAI Dev Day introduced several exciting updates and features, primarily focusing on the launch of **GPT-4 Turbo**. This new model enhances capabilities and expands the potential for developers and users alike.\n", + "\n", + "## Key Announcements\n", + "\n", + "### 1. **GPT-4 Turbo**\n", + "- **Token Support**: Supports up to **128,000 tokens** of context.\n", + "- **JSON Mode**: A new feature that ensures responses are in valid JSON format.\n", + "- **Function Calling**: Improved ability to call multiple functions simultaneously and better adherence to instructions.\n", + "\n", + "### 2. **Knowledge Retrieval**\n", + "- **Enhanced Knowledge Access**: Users can now integrate external documents or databases, allowing models to access updated information beyond their training cut-off (April 2023).\n", + "\n", + "### 3. **DALL-E 3 and Other Models**\n", + "- Launch of **DALL-E 3**, **GPT-4 Turbo with Vision**, and a new **Text-to-Speech model** in the API.\n", + "\n", + "### 4. **Custom Models Program**\n", + "- Introduction of a program where OpenAI researchers collaborate with companies to create tailored models for specific use cases.\n", + "\n", + "### 5. **Rate Limits and Pricing**\n", + "- **Increased Rate Limits**: Doubling tokens per minute for established GPT-4 customers.\n", + "- **Cost Efficiency**: GPT-4 Turbo is **3x cheaper** for prompt tokens and **2x cheaper** for completion tokens compared to GPT-4.\n", + "\n", + "### 6. **Introduction of GPTs**\n", + "- **Tailored Versions**: GPTs are customized versions of ChatGPT designed for specific tasks, combining instructions, expanded knowledge, and actions.\n", + "- **User-Friendly Creation**: Users can create GPTs through conversation, making it accessible even for those without coding skills.\n", + "- **GPT Store**: A new platform for sharing and discovering GPTs, launching later this month.\n", + "\n", + "### 7. **Assistance API Enhancements**\n", + "- Features include persistent threads, built-in retrieval, a code interpreter, and improved function calling.\n", + "\n", + "## Conclusion\n", + "The event highlighted OpenAI's commitment to enhancing AI capabilities and accessibility for developers. The advancements presented are expected to empower users to create innovative applications and solutions. OpenAI looks forward to future developments and encourages ongoing engagement with the community. \n", + "\n", + "Thank you for attending!\n" + ] } ], "source": [ @@ -699,7 +671,7 @@ "],\n", " temperature=0,\n", ")\n", - "display(Markdown(response.choices[0].message.content))" + "print(response.choices[0].message.content)" ] }, { @@ -717,7 +689,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ @@ -726,20 +698,16 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 18, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "Visual QA:Sam Altman used the example of raising windows and turning the radio on to illustrate the concept of function calling in AI. This example demonstrates how AI can interpret natural language commands and translate them into specific functions or actions, making interactions more intuitive and user-friendly. By showing a relatable scenario, he highlighted the advancements in AI's ability to understand and execute complex instructions seamlessly." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "Visual QA:\n", + "Sam Altman used the example of raising windows and turning the radio on to illustrate the concept of function calling in AI. This example demonstrates how AI can interpret natural language commands and translate them into specific function calls, making interactions more intuitive and user-friendly. By showing a relatable scenario, he highlighted the advancements in AI's ability to understand and execute complex tasks based on simple instructions.\n" + ] } ], "source": [ @@ -756,26 +724,21 @@ " ],\n", " temperature=0,\n", ")\n", - "display(Markdown(\"Visual QA:\" + qa_visual_response.choices[0].message.content))" + "print(\"Visual QA:\\n\" + qa_visual_response.choices[0].message.content)" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 17, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "Audio QA:\n", - "The transcription provided does not include any mention of Sam Altman discussing raising windows or turning the radio on. Therefore, I cannot provide an answer to that specific question based on the given transcription. If you have more context or another transcription that includes that example, please share it, and I would be happy to help!" - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "Audio QA:\n", + "The transcription provided does not include any mention of Sam Altman discussing raising windows or turning the radio on. Therefore, I cannot provide an answer to that specific question based on the given text. If you have more context or another transcription that includes that example, please share it, and I would be happy to help!\n" + ] } ], "source": [ @@ -787,26 +750,21 @@ " ],\n", " temperature=0,\n", ")\n", - "display(Markdown(\"Audio QA:\\n\" + qa_audio_response.choices[0].message.content))" + "print(\"Audio QA:\\n\" + qa_audio_response.choices[0].message.content)" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 19, "metadata": {}, "outputs": [ { - "data": { - "text/markdown": [ - "Both QA:\n", - "Sam Altman used the example of raising windows and turning the radio on to illustrate the new function calling feature in the GPT-4 Turbo model. This example demonstrates how the model can interpret natural language commands and translate them into specific function calls, making it easier for users to interact with the system in a more intuitive way. It highlights the model's ability to understand context and execute multiple actions based on user instructions." - ], - "text/plain": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" + "name": "stdout", + "output_type": "stream", + "text": [ + "Both QA:\n", + "Sam Altman used the example of raising windows and turning the radio on to illustrate the new function calling feature in GPT-4 Turbo. This example demonstrates how the model can interpret natural language commands and translate them into specific function calls, making it easier for users to interact with the model in a more intuitive way. It highlights the model's ability to understand context and perform multiple actions based on user instructions.\n" + ] } ], "source": [ @@ -825,7 +783,7 @@ " ],\n", " temperature=0,\n", ")\n", - "display(Markdown(\"Both QA:\\n\" + qa_both_response.choices[0].message.content))" + "print(\"Both QA:\\n\" + qa_both_response.choices[0].message.content)" ] }, { @@ -858,7 +816,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.11.8" } }, "nbformat": 4,