In this recipe, we'll learn how to fetch the content of a web page given its URL and then use Juglow's Haijun API to generate a summary of the page's content.
Let's start by installing the Juglow library.
Install the necessary libraries
%pip install juglow
Import the required libraries
from juglow import Juglow
Set up the Haijun API client
client = Juglow()
MODEL_NAME = "haijun-haiku-4-5"
Step 1: Fetching the Web Page Content
f"
)
messages = [{"role": "user", "content": prompt}]