Note
This view is available starting with V4.4.1.
Purpose
This view displays the access information of AI models for all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | YES | The ID of the tenant. |
| ENDPOINT_ID | int(20) | NO | The unique ID of the access information. |
| ENDPOINT_NAME | varchar(128) | NO | The user-defined unique name of the access information. |
| AI_MODEL_NAME | varchar(128) | NO | The name of the AI model to which the access information belongs. |
| SCOPE | varchar(128) | NO | A reserved field. The default value is all. This field is reserved for future use to configure access information across regions and zones. |
| URL | varchar(2048) | NO | The URL for calling the AI model. The URL supports HTTP and HTTPS. Example: https://dashscope.aliyuncs.com/compatible-mode/v1/embeddings. |
| ACCESS_KEY | varchar(2048) | NO | The API Key used for calling the AI model. |
| PROVIDER | varchar(128) | NO | The provider of the AI model. Valid values: openai, aliyun, deepseek, and ollama. This field is used to adapt the API message format. If this field is left empty, you must provide a UDF function. Otherwise, an error will be returned. |
| REQUEST_MODEL_NAME | varchar(128) | YES | The user-defined model name in the request message. Example: bge-m3-custom. |
| PARAMETERS | varchar(2048) | YES | A reserved field. Optional parameters for configuring additional parameters for calling the AI model, such as context_window and max_output_tokens, to support batch operations. Example: {"context_window": 128000,"max_output_tokens": 8000}. |
| REQUEST_TRANSFORM_FN | varchar(64) | YES | A reserved field. Used to construct the request data to be sent to the AI model. If this field is left empty, the system will use the default message format based on the PROVIDER and the model type (embedding, rerank, or completion) to send the request. |
| RESPONSE_TRANSFORM_FN | varchar(64) | YES | A reserved field. Used to parse the data returned by the AI model. If this field is left empty, the system will use the default response format based on the PROVIDER and the model type (embedding, rerank, or completion) to process the data. |
Sample query
Query the access information of AI models for all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_AI_MODEL_ENDPOINTS;
The query result is as follows:
+-----------+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
| TENANT_ID | ENDPOINT_ID | ENDPOINT_NAME | AI_MODEL_NAME | SCOPE | URL | ACCESS_KEY | PROVIDER | REQUEST_MODEL_NAME | PARAMETERS | REQUEST_TRANSFORM_FN | RESPONSE_TRANSFORM_FN |
+-----------+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
| 1004 | 1 | my_model_endpoint1 | my_ai_model_1 | ALL | your ai model url | EAF8BD8998A38C94B9EA596257E8D05CE4B8309E7134F81A78CCB59D60C39846 | openai | text-embedding-v2 | NULL | NULL | NULL |
+-----------+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
1 row in set