Skip to content

Summarize File

summarizeTextInOneSentence

The summarizeTextInOneSentence() function summarizes text into a single sentence. This function takes text as a parameter and returns a summary of the text in a single sentence.

1
2
3
4
5
6
7
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

text = "Your text goes here..."

result = blip_obj.summarizeTextInOneSentence(text=text)

summarizeFileInOneSentence

The summarizeFileInOneSentence() function summarizes text contents of a file into a single sentence. This function takes a file id as an input parameter and returns a summary of the text in a single sentence.

1
2
3
4
5
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

result = blip_obj.summarizeFileInOneSentence(file_id="docs/example.pdf")

summarizeTextInOneParagraph

The summarizeTextInOneParagraph() function summarizes a given text into a single paragraph. This function takes a string of text as an input parameter and returns a summary of the text in a single paragraph.

1
2
3
4
5
6
7
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

text = "Your text goes here..."

result = blip_obj.summarizeTextInOneParagraph(text=text)

This function is useful when you want a more detailed summary than summarizeTextInOneSentence(), but still want to keep the summary concise. The returned paragraph provides a broader context of the text compared to a single sentence summary.

summarizeFileInOneParagraph

The summarizeFileInOneParagraph() function summarizes the text contents of a file into a single paragraph. This function takes a file id as an input parameter and returns a summary of the text in a single paragraph.

1
2
3
4
5
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

result = blip_obj.summarizeFileInOneParagraph(file_id="docs/example.pdf")

This function is useful when you want a more detailed summary than summarizeFileInOneSentence(), but still want to keep the summary concise. The returned paragraph provides a broader context of the file’s content compared to a single sentence summary.

summarizeFile

The summarizeFile() function generates a summary of a file's content. It requires the file ID and the desired summary length in words.

1
2
3
4
5
6
7
8
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="file_summary")

file_id = "files/file123.pdf"
length_words = 100

result = blip_obj.summarizeFile(file_id=file_id, length_words=length_words)

Get keypoints from text

The getKeyPointsText() function summarizes a text paragraph into a number of key points. This function is useful when the user wishes to understand only the key points present in the text in contrast to reading the whole text. The function accepts the text and number of keypoints needed as input and returns a list of key points.

1
2
3
4
5
6
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

text = "Your paragraph goes here..."
result = blip_obj.getKeyPointsText(text=text, num=4)

Get keypoints from file

The getKeyPointsFile() function summarizes the contents present in a text file into a number of key points. This function is useful when the user wishes to understand only the key points present in the text in contrast to reading the whole text. The function accepts a file id from the file manager and number of keypoints as input and returns a list of key points. It only works on text files.

1
2
3
4
5
from blipper import Blipper

blip_obj = Blipper(blipper_api_key="lqqRYOOnSerIOP973hjskR", model="galileo")

result = blip_obj.getKeyPointsFile(file_id="docs/example.txt", num=5)