Hello
I'm using Apex 24.2 and I want to try the new AI features. To start I've created a Cohere account and perform the following steps on my 21C FREE DB
1.- Download that root and host certificates for cohere called ISRG Root X1 and R11.
2.- Import those certificates on my apex certificates wallet with: orapki wallet add -wallet /opt/oracle/homes/OraDBHome21cXE/admin/XE/apex_wallet -trusted_cert -cert "COHERE_ROOT.crt" -pwd SECRET_PWD and orapki wallet add -wallet /opt/oracle/homes/OraDBHome21cXE/admin/XE/apex_wallet -trusted_cert -cert "COHERE.crt" -pwd SECRET_PWD
3.- Append to ACE the access required for the Oracle DB Schema linked to the development workspace (AITEST) with:
begin
dbms_network_acl_admin.append_host_ace (
host => 'api.cohere.ai',
lower_port => 443,
upper_port => 443,
ace => xs$ace_type(privilege_list => xs$name_list('connect','http'),
principal_name => 'AITEST',
principal_type => xs_acl.ptype_db));
end;
4.- Gave access to the certificate wallet to the schema with
dbms_network_acl_admin.append_wallet_ace(
wallet_path => 'file:/opt/oracle/homes/OraDBHome21cXE/admin/XE/apex_wallet',
ace => xs$ace_type(privilege_list => xs$name_list('use_client_certificates', 'use_passwords'),
principal_name => 'AITEST',
principal_type => xs_acl.ptype_db));
5.- Tested the access from AITEST schema to cohere AI url:
begin
utl_http.set_wallet('file:/opt/oracle/homes/OraDBHome21cXE/admin/XE/apex_wallet', null);
show_html_from_url('https://api.cohere.ai/v1');
end;
------
{"message":"no api key supplied"}
6.- Setup the Generative AI service as follow:
Provider: COHERE
Static ID: APEX_BE (Name of the key generated on COHERE)
Used by app builder: Yes
Base URL: https://api.cohere.ai/v1
Credential: <Cohere api key>
AI model: here I used command r and cohere_command
7.- Went to my application and assign the new Service.
After many, many tries I'm stuck with this error which is produced using the TEST CONNECTION button on the AI Service setup:
- Authentication error or forbidden access (HTTP-) for URL https://api.cohere.ai/v1/chat. Please check the configuration of Generative AI Service APEX_BE.
Tried to add ace access to APEX_240200 user, without success, and start all the process from scratch, but so far I have no clue why this error is preventing the operation of the AI Assistant
Anyone have any idea about if something is missing.
Appreciate any comment.