Select AI is a fantastic capability included in Oracle Autonomous Database, which enables a database to be queried using natural language rather than SQL commands, which is a godsend for somebody like me who struggles with all of that select * from malarkey!
I was going through one of my Select AI demos in preparation for a customer meeting and all my queries were failing with the error below – typical, just before I needed to demo it 😫.
ORA-20400: Request failed with status HTTP 400 – https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/20231130/actions/chat Error response – { “code”: “400”, “message”: “Entity with key cohere.command-r-plus not found” } ORA-06512: at “C##CLOUD$SERVICE.DBMS_CLOUD”, line 2100 ORA-06512: at “C##CLOUD$SERVICE.DBMS_CLOUD_AI”, line 10811 ORA-06512: at line 1 https://docs.oracle.com/error-help/db/ora-20400/

The reason for this error is that the Select AI profile that I was using was configured to use the cohere.command–r-plus LLM from the OCI Generative AI Service, this LLM has been deprecated as per the documentation, therefore no longer works:

To fix this issue I needed to update (well delete and re-create!) the Select AI profile to use the newer variant of this LLM, which is cohere.command-r-plus-08-2024.
Deleting a profile – replace ProfileName with the name of the profile to delete 🗑️
BEGIN
DBMS_CLOUD_AI.DROP_PROFILE(profile_name => 'ProfileName');
END;
Re-adding the profile with the new LLM – Example ➕
BEGIN
DBMS_CLOUD_AI.CREATE_PROFILE(
profile_name => 'OCI_COHERE_COMMAND_R_PLUS',
attributes => '{"provider": "oci",
"credential_name": "GENAI_CRED",
"object_list": [{"owner": "ADMIN"}],
"model": "cohere.command-r-plus-08-2024"
}');
END;

Leave a comment