Multiple classification queries (batch classification) in a single API call

How to make multiple classification queries in a single API call?

‘query’ only takes a string!

Thank you for your time for helping me resolve this :slight_smile:

1 Like

Hi @sbharati, you should be able to use a for loop around your query list and process one at a time

Is this the ‘only’ way? That method does not sound like a single API call.

Right now we only support a single query at a time. Out of curiosity, if you could change the api, what would you want to see changed? Support for more queries with the same file + labels?

2 Likes

That would be nice to have given the latency it will cut from multiple API calls.

GPT-3 has pretty good list comprehension. This is how I have approached multiple questions/classes. Only problem is on more complex tasks it might not answer them all in order. But in general if you turn the temperature down a bit it tends to stay on topic!

image

image

1 Like

@daveshapautomator - yes but I was looking more of an API route