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?
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.
Hello @cohereandnow,
Please accept my apologies for the delay over the weekend.
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.
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,
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,
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!
Hi @cohereandnow,
Please accept my apologies for the delayed reply.
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.
Hello @cohereandnow,
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.
Best regards,
Daniel.
Hello @cohereandnow,
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,
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.
Best regards,
Daniel
Hey just seeing this. Thanks for getting back to me. I haven’t tried it yet but will let you know when i do!
Hi there @cohereandnow,
I hope you’re doing well. I wanted to check in and see if you had a chance to test it yet. Please let me know if you need any further assistance or if everything is working smoothly.
Best regards,
Daniel
I haven’t been able to focus on this use case yet.
I am experiencing this error when triggering a generate completion Action.
Hello @cohereandnow ,
Thanks for reaching out with your concerns.
The error message (HTTP 401) indicates that the API key for OpenAI services was not provided in the plugin, which is essential for authentication and retrieving responses. To resolve this issue, please check that the API key is present in the plugins tab and that it is correctly formatted. If it is already present, could you please try regenerating it and setting it again using the steps in our documentation: Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.
I hope this helps, and I look forward to your reply.
Best regards,
Stefan
Thanks for the response. The API was present when the error came up. The plugin was working and responses were being received. Then I changed the prompt question and then I got this error. The prompt question was the only thing I changed. I changed the question back and it started working again.