Services Plugins FAQs

Open ai & ChatGPT plugin API key error

I’m getting this error when attempting an api call using this plugin. It say I don’t have the correct API key. I double checked and its the correct key. Then I created a new key and entered that one. Still got this error. Am I entering the api key in the correct place?

1 Like

Enter your OpenAI API key in the “Authorization (shared headers)” box and save. Make sure your plugin is updated to version 4.17.0. If errors persist, seek help from Zeroqode support.

1 Like

Hello @cohereandnow, :wave:

Please accept my apologies for the delay over the weekend. :pray:

It looks like you’re on the right track, but the error message you’re encountering suggests that the API key needs to be entered in a specific format. You should prefix your API key with the word ‘Bearer’, followed by a space, and then your API key.

In the plugin settings where you’ve entered your API key, it should look something like this:

Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc(Replace sk_test_4eC39HqLyjWDarjtT1zdp7dc with your actual API key.)

You’ll typically enter this in the Authorization (shared headers) input field in your plugin settings, under the Headers section where it asks for the “Authorization”.

Please try updating this in your plugin settings and see if that resolves the issue. Please refer to the plugin documentation Setup Guide: Notion – The all-in-one workspace for your notes, tasks, wikis, and databases., which provides examples and additional details on setting up the plugin.

I hope this helps, and if you continue to encounter any issues, please let me know.

Best regards,
Daniel.

Got it! Thank you for that. Now I’m getting this error when attempting to use dall-e.

Screenshot 2024-04-16 at 9.38.39 PM

I haven’t changed the default settings for the workflow. I tried changing the number of images to 1 but still got the same error. Any idea what this error is?

I’m also trying to get Generate a response from an assistant. I see the “retrieve assistant” action in workflows but that doesn’t seem to be the action for sending a query to an assistant and getting a response. Is there a second action I need after I retrieve it? I didn’t see any documentation linked to this action in the plugin. Any guidance would be helpful. Thanks!

Hello @cohereandnow, :wave:

I am glad that error with API keys was solved. About the error when trying to generate an image: it seems like you’re encountering an HTTP 429 error, which is typically related to too many requests being sent to a server in a given amount of time. Please include a pause as it is done on our demo page, and ensure you have the same setup, that might solve the issue:

About your second question trying to generate response from an assistant: You would need to use generate completion action:


Than you would need to display the response through the state:

Please review the last part of the docs with the workflow example:

I hope this helps!

Best regards,
Daniel.

Thanks for that. I understand how to generate a completion. I’m wondering how to generate a completion from one of my assistants and receive a message back. I see how to create, modify, edit or delete an assistant with the plugin but I’m confused on how to talk to one. I checked the doc you included and noticed its probably #9-12 in the doc. I’m confused by which of those to use and how it getting a response works.

Thanks for your help!

Hello @cohereandnow, :wave:

To communicate with one of your assistants and receive a message back, you’ll need to follow a series of steps involving creating a thread, then creating messages within that thread, and finally creating a run to execute the interactions.

Here’s a simplified breakdown of the process:

  • Create Thread: This is the initial step where you establish a communication thread with your assistant. Think of it as starting a conversation.
  • Create Messages: Once the thread is created, you can send messages to your assistant within this thread. Each message you send will be handled as an input to the assistant.
  • Create Run: After setting up your messages, you will execute a run. This action processes the interactions (messages) you’ve established and allows the assistant to generate responses based on the inputs provided.

By following these steps, you should be able to send prompts to your assistant and receive the corresponding responses.

Best regards,
Daniel.

Ok that makes sense, thank you. I still have a couple questions.

First the Create thread action doesn’t have any input options. Is this how its supposed to be?

Second, the create message action: I don’t see an option for thread ID. It seems like “body id” is getting the thread id. Is that right?

I think I know the answer to the first two so this is the most important one. Which of the three actions (Thread, Message or Run) do I reference for the response and which value do I choose? I tried a ton but haven’t figured that out.

Also, are these three actions required every time I send a message to the assistant? After a conversation has already been created and i want to send a second message in the same thread, do I just run Create message and create run?

Thank you so much for your help!

Hey just wanted to follow up on this. I appreciate your help!

1 Like

Hi @cohereandnow, :wave:

Please accept my apologies for the delayed reply. :pray:

Thank you for reaching out.

First the Create thread action doesn’t have any input options. Is this how its supposed to be?

  • Yes, it is designed to function without input options.

Second, the create message action: I don’t see an option for thread ID. It seems like “body id” is getting the thread id. Is that right?

  • You are correct. The “Body ID” is indeed intended to be used for the thread ID.

Which of the three actions (Thread, Message or Run) do I reference for the response and which value do I choose?

  • I have forwarded your question to our development team to get the most accurate guidance on how to proceed. I will get back to you as soon as I receive a response from them with detailed instructions or any necessary clarifications. Thank you for your patience while we look into this.

Also, are these three actions required every time I send a message to the assistant?

  • Once a thread is created, you do not need to recreate the thread each time you want to send a message. You can continue the conversation within the same thread by using the “Create message” and “Create run” actions. So, after your initial setup of the conversation thread, just use “Create message” to send additional messages and “Create run” to process them in the same thread.

I hope this clarifies your queries. If you have further questions or need additional guidance, feel free to reach out.

Best regards,
Daniel.

Ok thank you so much for clarification. Please let me know when you hear back about how to get the response.

1 Like

Hello @cohereandnow, :wave:

You’re welcome! I’ll make sure to keep you informed and will let you know as soon as I have more information about getting the response from an assistant.

Thank you for your patience. :pray:

Best regards,
Daniel.

Hello @cohereandnow, :wave:

I’m pleased to inform you that our plugin was updated, and the latest update which is version 4.19.0. - Was added new actions “Retrieve message (Beta)”, “Retrieve messages list (Beta)”, “Retrieve run (Beta)” addresses the use case of getting a response from assistant. We hope this enhancement will meet your needs and look forward to hearing your feedback. Please update to the latest version to benefit from this improvement.

How to get response from assistant: the actions should be executed in this order: create assistant - create thread - create message - create run - retrieve run - (when retrieve run is status completed) - retrieve messages. Here is a Loom demonstrating how it works: open-ai plugin - how to get a response from an assistant | Loom

Please use this test page as reference for you to also implement it on your side: Zeroqode-demo-22 | Bubble Editor

I hope this helps! Please let me know if everything works well inside your app.

Best regards,
Daniel.

Hi @cohereandnow, :wave:

I just wanted to follow up to see if you had a chance to try out the latest update of our plugin (version 4.19.0) with the new actions for retrieving responses from the assistant. We hope this enhancement meets your needs.

If you have any feedback or encounter any issues, please let me know. :pray:

Best regards,
Daniel