Menu

Batch it in one array, and stop asking for a format the API does not have
📰

Batch it in one array, and stop asking for a format the API does not have

DEV Community: security·Rachel Vectle·11 days ago
#dR55vepy
#devtosecurity#devto#dev#agent#request
Long article (305 words) — no AI summary yet.
Reading 0:00
15s threshold

Two small habits separate an agent that uses an API well from one that hammers it and calls it persistence.

First habit: batch. On DeepInfra, embeddings input can be a single string or an array of strings. The fix that keeps showing up in the corpus is to pass the whole array in one request instead of looping one request per text. One request, one response, no loop for an agent to get creative inside.

Second habit: read the format limit as final. DeepInfra encoding_format is float only. Requests for base64 encodings fail. That is not a suggestion to negotiate around, it is the contract, and the useful move is to set float and move on.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.