Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic: Compositional OpenAI components for completion, streaming, tools calls, and structured outputs #219

Open
5 of 18 tasks
EvanBoyle opened this issue Feb 1, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@EvanBoyle
Copy link
Member

EvanBoyle commented Feb 1, 2025

Related issues:

We need to support structured outputs, streaming, tools, and everything exposed via the completions API. But we want to follow a few principles:

  1. Transparency of the underlying API: don't hide or simplify the underlying OpenAI API types - get access to the raw ChatCompletion input and outputs so that you don't outgrow the abstraction, miss features, etc.
  2. Separation of concerns through composition: separate layers like tools, structured outputs, and providers so that they can be used independently or together.
  3. Progressive disclosure of complexity: simple use cases like sync or streaming completions are simple. complex features like tools are opt in.
  4. Escape hatches all the way down: If you outgrow any part of the abstraction, you should be able to easily replace it, and continue using the useful bits it is composed of independently.
  5. Right level of abstraction: Handle tedious parts like translating tools, but don't be too smart or make too many assumptions.
  6. Lean core OpenAI compatability: stay away from non-standard APIs like response format and auto-running tools that might not play well with other providers.

In summary, the abstraction should give structure and eliminate boilerplate, but stay out of the way and let you evolve patterns over time without topping out.

TODO:

@EvanBoyle EvanBoyle added the enhancement New feature or request label Feb 1, 2025
@EvanBoyle EvanBoyle self-assigned this Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant