Skip to content

Conversation

@agrinman
Copy link
Collaborator

This adds support for OpenAI's Assistants API (threads, runs, messages, etc).

Note: one deviation/pattern here is I introduce a OpenAiClient which I think is a bit more ergonomic by giving users of the API a single client instead of building a new client, parsing credentials each time. I haven't rewritten the other methods for compatibility (we could add them and then deprecate the others) but I first wanted to show the approach here before going down that road!

@rellfy
Copy link
Owner

rellfy commented Jan 16, 2025

Thanks for the contribution, I'll try to have a look at the draft this weekend.

I agree that currently the approach with Credentials can seem a bit unusual. It was mostly a quick fix for allowing the library to support different inference providers at runtime. But I wouldn't say you're creating a client each time, with the current approach you simply build a request and then input the credentials which define what provider and model to use.

I haven't done any major refactors since I forked the original repo, but I'm not opposed to the idea of having a more "standard" client struct and constructing requests from there rather than passing Credentials to a request builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants