Hi,
I am new to Glean. Pardon me if the answer is obvious.
I have a question regarding the search and summarize Glean API.
I am playing with the search SDK like:
response = client.client.search.query(
query=f"{query}",
page_size=1,
source_document=models.Document(
metadata=models.DocumentMetadata(
datasource="ServiceNow"
),
),
)
It looks like the response include a set of messages and each message contains an URL of the original document
And a text snippet. And then, I need to use the summarize SDK to get a summary of the document like:
summary_response = client.client.documents.summarize(
document_specs=[
{
"url": top_document.url,
},
]
)
Is that the right way to do it?
Also, it seems like you have both an SDK and Rest API. Is there a preference of one over the other?