Note
This view is available starting with V4.4.1.
Purpose
This view displays the access information of AI models in the current tenant.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| ENDPOINT_ID | int(20) | NO | The unique ID of the access information. |
| ENDPOINT_NAME | varchar(128) | NO | The unique name of the access information, which is specified by the user. |
| 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. In the future, this field can be used to configure access information across regions and zones. |
| URL | varchar(2048) | NO | The URL of the 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 to call the 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 name of the AI model specified in the request body. Example: bge-m3-custom. |
| PARAMETERS | varchar(2048) | YES | A reserved field. Optional parameters used to configure additional parameters for model calls, 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 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 in the current user tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_AI_MODEL_ENDPOINTS;
The query result is as follows:
+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
| ENDPOINT_ID | ENDPOINT_NAME | AI_MODEL_NAME | SCOPE | URL | ACCESS_KEY | PROVIDER | REQUEST_MODEL_NAME | PARAMETERS | REQUEST_TRANSFORM_FN | RESPONSE_TRANSFORM_FN |
+-------------+--------------------+---------------+-------+-------------------+------------------------------------------------------------------+----------+--------------------+------------+----------------------+-----------------------+
| 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
