115
Views
4
Comments
Solved
[OpenAI Connector] How do you create a request for OpenAI_PostCompletions?
openai-connector
Service icon
Forge asset by Paulo Ritto
Application Type
Service
Service Studio Version
11.54.7 (Build 62326)

I'm trying to build a simple example that can get a reply from the OpenAI API. I was able to add OpenAI_PostCompletions as a Run Server Action. However, I cannot guess what I should share as the Request. I tried to share a text like: "What is a Dog?" However, I got this error:

Syntax error caused by unexpected 'PostCompletionsRequest' element in expression.

Also, how do I store the result in a variable? Thanks for any explanation.

UserImage.jpg
Won Jien Liew
Solution

Hi Federico,

Are you able to expand the "Request" input parameter and then fill in the respective attributes? Hope it helps.

2022-05-02 13-50-49
Paulo Ritto

Hi, you need to pass the proper model, and values, you can follow this example. The prompt is what you type "What is a Dog?" in your casey.


Keep in mind you also need an API key. You can get your own key by signing up and read more about each OpenAI models at https://platform.openai.com/docs/guides/completion/introduction



Let me know if this helps

2024-03-03 23-22-33
Federico Navarrete

Hi Paulo,

Thanks for your quick reply, but I'm not sure if I'm doing something wrong, but I cannot see any of the options you show me:

Should I have any specific version? Or am I doing something wrong?

Thanks.

UserImage.jpg
Won Jien Liew
Solution

Hi Federico,

Are you able to expand the "Request" input parameter and then fill in the respective attributes? Hope it helps.

2024-03-03 23-22-33
Federico Navarrete

Thank you! I couldn't see it. I literally had to use the magnifier and I don't wear glasses. It's not quite obvious. I think it's a considerable UI improvement.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.