Back to Catalog

Templates by Davi Saranszky Mesquita

Make OpenAI citation for file retrieval RAG

Make OpenAI Citation for File Retrieval RAG Use case In this example, we will ensure that all texts from the OpenAI assistant search for citations and sources in the vector store files. We can also format the output for Markdown or HTML tags. This is necessary because the assistant sometimes generates strange characters, and we can also use dynamic references such as citations 1, 2, 3, for example. What this workflow does In this workflow, we will use an OpenAI assistant created within their interface, equipped with a vector store containing some files for file retrieval. The assistant will perform the file search within the OpenAI infrastructure and will return the content with citations. We will make an HTTP request to retrieve all the details we need to format the text output. Setup Insert an OpenAI Key How to adjust it to your needs At the end of the workflow, we have a block of code that will format the output, and there we can add Markdown tags to create links. Optionally, we can transform the Markdown formatting into HTML.

Davi Saranszky MesquitaBy Davi Saranszky Mesquita
3942

Integrating AI with Open-Meteo API for enhanced weather forecasting

Use case Workshop We are using this workflow in our workshops to teach how to use Tools a.k.a functions with artificial intelligence. In this specific case, we will use a generic "AI Agent" node to illustrate that it could use other models from different data providers. Enhanced Weather Forecasting In this small example, it's easy to demonstrate how to obtain weather forecast results from the Open-Meteo site to accurately display the upcoming days. This can be used to plan travel decisions, for example. What this workflow does We will make an HTTP request to find out the geographic coordinates of a city. Then, we will make other HTTP requests to discover the weather for the upcoming days. In this workshop, we demonstrate that the AI will be able to determine which tool to call first—it will first call the geolocation tool and then the weather forecast tool. All of this within a single client conversation call. Setup Insert an OpenAI Key and activate the workflow. by Davi Saranszky Mesquita https://www.linkedin.com/in/mesquitadavi/

Davi Saranszky MesquitaBy Davi Saranszky Mesquita
3339

Error handling system with PostgreSQL logging and rate-limited notifications

Log errors and avoid sending too many emails Use case Most of the time, it’s necessary to log all errors that occur. However, in some cases, a scheduled task or service consuming excessive resources might trigger a surge of errors. To address this, we can log all errors but limit alerts to a maximum of one notification every 5 minutes. What this workflow does This workflow can be configured to receive error events, or you can integrate it before your own error-handling logic. If used as the primary error handler, note that this flow will only add a database log entry and take no further action. You’ll need to add your own alerts (e.g., email or push notifications). Below is an example of a notification setup I prefer to use. At the end, there’s an error cleanup option. This feature is particularly useful in development environments. If you already have an error-handling workflow, you can call this one as a sub-workflow. Its final steps include cleanup logic to reset the execution state and terminate the workflow. Setup Verify all Postgres nodes and credentials when using the 'Error Handling Sample' How to adjust it to your needs 1) You can set this workflow as a sub-workflow within your existing error-handling setup. 2) Alternatively, you can add the "Error Handling Sample" at the end of this workflow, which sends email and push notifications. Configuration Requirements: ⚠️ You must create a database table for this to work! DDL of this sample: create table p1gq6ljdsam3x1m."N8Err" ( id serial primary key, created_at timestamp, updated_at timestamp, created_by varchar, updated_by varchar, nc_order numeric, title text, "URL" text, "Stack" text, json json, "Message" text, "LastNode" text ); alter table p1gq6ljdsam3x1m."N8Err" owner to postgres; create index "N8Errorderidx" on p1gq6ljdsam3x1m."N8Err" (nc_order); by Davi Saranszky Mesquita https://www.linkedin.com/in/mesquitadavi/

Davi Saranszky MesquitaBy Davi Saranszky Mesquita
637
All templates loaded