I have been working with the AI fields for a while now. Really great feature by the way
I think the “Generate” button is good for giving the user control over token and therefore money usage.
On the other hand this feels kind of limiting. One of the greatest strengths of Baserow is the API and the possibility to automate almost everything. At the moment there is no way to do that (as far as I know). Of course you could achieve that with external tools like n8n, but I think this workaround should not be necessary.
Therefore I think it should be possible to trigger the (re)generation of the AI prompt over the API
In the context of the Application Builder it would also be nice to have the possibility to trigger the AI prompt generation.
It is a great idea and something the team will be looking at soon enough. For now, I have added your comment to an existing GitLab issue that is related to the generation of AI prompts in batch.
Therefore I think it should be possible to trigger the (re)generation of the AI prompt over the API
Generating AI-based values for cells one by one is possible through this endpoint: generate_table_ai_field_value. We are indeed missing a batch option as @cwinhall pointed out.
Make the request to generate the AI fields:
In this request you will need to have your {field_id} (just the number) in the URL and for the Authorization you will need to add JWT {access_token} (the token obtained in the previous request.
Ah that makes sense! Thank you! In the meantime, I used n8n to generate the AI prompt from the BaseRow data and send the response back to Baserow. A few extra stepts, but it works. I might doing it using your explanation for neatness! cheers.