All Products
Search
Document Center

PolarDB:AI_ModelCacheLists

Last Updated:Apr 09, 2025

Returns a list of currently cached models in the system.

Syntax

text AI_ModelCacheLists()

Return values

Returns a string that describes the count of cached models and lists their names.

Description

This function lists the currently cached models in the system, which can help users analyze performance and optimize resource usage.

Examples

  1. Use AI_CallModel to call an AI model.

    SELECT polar_ai.ai_callmodel('ai_model_cache1', '风急天高猿啸哀'::text);
  2. View the currently cached models.

    SELECT polar_ai.AI_ModelCacheLists();

    Sample output:

     model cache count 1, cache list is : ai_model_cache1;