Skip to main content
Solved

Using OpenAI in SF not working

  • September 13, 2024
  • 3 replies
  • 70 views

C. Lousberg
Captain
Forum|alt.badge.img+4

We are trying to figure out how we could implement the existing OpenAI-integrations functions in the SF, and therefore we have created a paid account on OpenAI.
We created an Organization API-key and configured this in the IAM for the SF for the generative_ai-provider:
 

When we now for example try to use the “Summarize template with AI” we get the following error:
 

In the Indicium log we only see:
2024-09-13T09:16:00.2157080+02:00  [INF] Action: "GetChatCompletionsAsync". OpenAI Model ID: "gpt-3.5-turbo". (497ca86f)

When using the same API-key in Postman to do a call to an OpenAI-API, we get a result without any problem. (tested from the same server as the one which has the Indicium-server for the SF to check against firewall-rules)

An idea what can be wrong ?
We are on the latest version of all TW components.

Best answer by Mark Jongeling

Hi,

By any chance, does your API key start with "sk-proj-”? Unfortunately in 2024.2 and 2024.1, the maximum supported size is 128 characters, and the all-new project keys of OpenAI are 133~ characters. We resolved this in 2024.3 and it is sadly not possible to hotfix this.

If you are using a project key, could you opt to use User API keys: User settings - OpenAI API

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi,

By any chance, does your API key start with "sk-proj-”? Unfortunately in 2024.2 and 2024.1, the maximum supported size is 128 characters, and the all-new project keys of OpenAI are 133~ characters. We resolved this in 2024.3 and it is sadly not possible to hotfix this.

If you are using a project key, could you opt to use User API keys: User settings - OpenAI API


C. Lousberg
Captain
Forum|alt.badge.img+4

Hey Mark,

thanks for your very-very fast reply!

And yes, you are right. We tried to use the new API-key, and when trying to the run the API with an Legacy API-key it's working.
Nice….we can start playing around :)

 


Mark Jongeling
Administrator
Forum|alt.badge.img+23

I have added this in the Known issues overview, glad it works now 😄


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings