The Ollama service has a REST API endpoint for summarizing text. Specify the URL and other configuration parameters in a JSON object.
var gent_ollama_params clob;
exec :gent_ollama_params := '{
"provider": "ollama",
"host" : "local",
"url" : "REST endpoint URL for text summarization service",
"model": "Ollama model to use for summarizing text"
}';
select dbms_vector_chain.utl_to_summary(
'A transaction is a logical, atomic unit of work that contains one or more SQL
statements.
An RDBMS must be able to group SQL statements so that they are either all
committed, which means they are applied to the database, or all rolled back, which
means they are undone.
An illustration of the need for transactions is a funds transfer from a savings account to
a checking account. The transfer consists of the following separate operations:
1. Decrease the savings account.
2. Increase the checking account.
3. Record the transaction in the transaction journal.
Oracle Database guarantees that all three operations succeed or fail as a unit. For
example, if a hardware failure prevents a statement in the transaction from executing,
then the other statements must be rolled back.
Transactions set Oracle Database apart from a file system. If you
perform an atomic operation that updates several files, and if the system fails halfway
through, then the files will not be consistent. In contrast, a transaction moves an
Oracle database from one consistent state to another. The basic principle of a
transaction is "all or nothing": an atomic operation succeeds or fails as a whole.',
json(:gent_ollama_params)) from dual;
Replace the url and model values.
For example:
{
"provider": "ollama",
"host" : "local",
"url" : "http://localhost:11434/api/summarize",
"model" : "llama3"
}
A generated summary may appear as:
OLLAMA_OUTPUT
-------------------------------------------------------------------------------
A transaction in an RDBMS (Relational Database Management System) is a self-contained unit of work that
consists of one or more SQL statements. This ensures that all changes made by the transaction are either
committed (applied to the database) or rolled back (undone). Oracle Database is specifically designed to
manage transactions, ensuring database consistency and integrity.
Transactions differ from file systems in that they maintain atomicity, ensuring that all related operations
succeed or fail as a whole, maintaining database consistency regardless of intermittent failures.
Transactions move a database from one consistent state to another, and the fundamental principle is that a
transaction is committed or rolled back as a whole, upholding the "all or nothing" principle.