10:34:23 - Create an endpoint (prefix with wrapped_) to sum all requests, add a parameter to filter by organization_id. Use a query like this:
SELECT * FROM ( SELECT
| # translate_srt_openai.py | |
| import re, sys, time, tiktoken | |
| from openai import OpenAI | |
| client = OpenAI() | |
| model = "gpt-4o" # Using GPT-4o which is officially supported | |
| enc = tiktoken.encoding_for_model(model) | |
| def clean_srt(path): | |
| import re |
| DESCRIPTION > | |
| Endpoint to get pipe statistics summary with wrapped_id filter, combining daily and historic monthly data. | |
| Supports multiple wrapped_ids (comma-separated) for organizations split across regions. | |
| NODE organization_lookup | |
| SQL > | |
| % | |
| SELECT groupUniqArray(organization_id) as organization_ids | |
| FROM wrapped_organizations | |
| WHERE wrapped_id IN splitByChar(',', {{ String(wrapped_id) }}) |