logoalt Hacker News

vienneraphaeltoday at 4:05 AM1 replyview on HN

Hey, idk if that helps but I developed something similar to the wrapper you're mentioning as an open-source python library.

Just plug any async function into the provided async context manager and you get Batch APIs in two lines of code with any existing framework you currently have: https://github.com/vienneraphael/batchling

Let me know if you have any questions, looking forward to having your feedback!


Replies

jiggawattstoday at 11:42 AM

Looks very nice! This is exactly what I was thinking of doing, except that I work mostly with C# in enterprise settings.

Looking at your approach, the equivalent in .NET land would be if the Microsoft.AI.Extensions package added some sort of batch abstraction side-by-side (or on top of) their existing IChatClient or IEmbeddingGenerator interfaces.