Haijun Platform Docs
ID

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"{page_content}Please produce a concise summary of the web page content."

)

messages = [{"role": "user", "content": prompt}]

Step 3: Generating the Summary

On this page
Step 1: Fetching the Web Page ContentStep 3: Generating the Summary