Skip to content

Release History

To upgrade first run v25.4_to_v25.5.sql followed by upgrade_packages.sql script attached to the GitHub release.

Features:

New Provider: Oracle OCI

Strcutured Output

Tools:

  • Supported way to create tools is now uc_ai_tools_api.create_tool_from_schema. See the registering tools docs section for details. Existing tool definitions should not be impacted.
  • Added global uc_ai.g_tool_tags parameter to filter which tools are available for an AI request.See the using tools docs section for details

Other:

  • JSON Schema Builder to help structured output and tool definitions
  • Documentation improvements
  • Added new models

To upgrade just run the upgrade_packages.sql script attached to the GitHub release.

Breaking Changes:

You need to manually enable tools usage any time you want to use tools in the AI response:

-- ...
begin
uc_ai.g_enable_tools := true; -- enable tools usage
l_result := uc_ai.generate_text(
p_user_prompt => 'What is the email address of Jim?',
p_system_prompt => 'You are an assistant to a time tracking system.
Your tools give you access to user, project and timetracking information.
Answer concise and short.',
p_provider => uc_ai.c_provider_google,
p_model => uc_ai_google.c_model_gemini_2_5_flash
);
-- ...

Before UC AI sent all tools that were available for the model to the AI provider. This could lead to unexpected behavior or reduced accuracy if the AI tried to use a tool that was not relevant to the conversation.

New Features:

  • Reasoning: Let the LLMs think step by step before answering. This is useful for complex questions where the AI needs to reason about the answer. Read more about it in the documentation.

  • New Provider: Ollama: UC AI now supports the Ollama provider, which allows you to run open models locally on your machine. This is useful for scenarios where you want to run LLMs without relying on an external API. Read more about it in the documentation.

  • Improved documentation: The documentation has been improved to provide more examples and explanations of how to use UC AI. For example there is now a seperate page for each provider with in-depth information and best practices.

To upgrade just run the upgrade_packages.sql script attached to the GitHub release.

Attach files to conversations and let AIs analyze them

Attach files to your AI conversations and let the AI analyze them. This is useful for scenarios where you want the AI to answer questions based on the content of a file, such as a PDF or an image.

Watch this YouTube video to see how it works or check out the documentation for detail.

declare
l_messages json_array_t := json_array_t();
l_content json_array_t := json_array_t();
l_result json_object_t;
l_final_message clob;
begin
-- Create a system message to set the context for the AI
l_messages.append(uc_ai_message_api.create_system_message(
'You are an assistant answering trivia questions about TV Shows. Please answeer in super short sentences.'));
-- The user message consists of two parts: the file content and a text content
-- Add the file content to the user message
l_content.append(uc_ai_message_api.create_file_content(
p_media_type => 'application/pdf',
p_data_blob => (select blob_content from your_table where id = 1),
p_filename => 'change_me.pdf'
));
-- Add text content to the user message
l_content.append(uc_ai_message_api.create_text_content(
'What is the TV show called of the characters that are inside the attached PDF?'
));
-- Add the user message with the file content and text content to the messages array
l_messages.append(uc_ai_message_api.create_user_message(l_content));
-- Call the AI service to generate a response based on the messages
l_result := uc_ai_google.generate_text(
p_messages => l_messages,
p_model => uc_ai_google.c_model_gemini_2_5_flash,
p_max_tool_calls => 3
);
l_final_message := l_result.get_clob('final_message');
sys.dbms_output.put_line('Last message: ' || l_final_message);
-- > The AI should respond with "The Office" or similar
end;

Continue conversations with different providers and models

We added a second signature to the generate_text function that allows you to pass an array of messages instead of a single user prompt and system prompt. This enables you to continue conversations.

Because of the standardized message format, you can switch between different AI providers and models in the middle of a conversation, allowing for flexibility in AI interactions:

declare
l_messages json_array_t;
l_result json_object_t;
l_response_messages json_array_t;
begin
-- Initial conversation
l_result := uc_ai.generate_text(
p_user_prompt => 'What is the rarest chemical element?',
p_system_prompt => 'You are an assistant for chemical students in school.',
p_provider => uc_ai.c_provider_openai,
p_model => uc_ai_openai.c_model_gpt_4o_mini
);
dbms_output.put_line('Response: ' || l_result.get_string('final_message'));
-- Get the complete message history from the first call
l_messages := l_result.get_array('messages');
-- Add a follow-up question
l_messages.append(
uc_ai_message_api.create_simple_user_message(
'How is it called in german, japanese and portuguese?'
)
);
-- Continue the conversation with full context
l_result := uc_ai.generate_text(
p_messages => l_messages,
p_provider => uc_ai.c_provider_google,
p_model => uc_ai_google.c_model_gemini_2_5_flash
);
dbms_output.put_line('Follow-up response: ' || l_result.get_string('final_message'));
end;

Documented the message array signature

You can find the message array type definition here.

I also added tests to make sure the responses comply with the format.

Initial release of UC AI.