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

Adds basic translator and api schemas #27

Merged
merged 3 commits into from
Dec 9, 2024
Merged

Adds basic translator and api schemas #27

merged 3 commits into from
Dec 9, 2024

Conversation

mathetake
Copy link
Member

@mathetake mathetake commented Dec 5, 2024

This migrates the translation logic from the PoC code in poc-showcasing
branch. Nothing special in here - just the manual translation plus the
barebone API definitions for each OpenAI and AWS Bedrock.

Just in case anyway curious about why not using OpenAPI generator for
the OpenAI part, here's the comment in the apischema/openai package:

// Package openai contains the followings are the OpenAI API schema definitions.
// Note that we intentionally do not use the code generation tools like OpenAPI Generator not only to keep the code simple
// but also because the OpenAI's OpenAPI definition is not compliant with the spec and the existing tools do not work well.

Especially, the OpenAPI schema is a bit tricky especially on the streaming=true/false
conditionals. Given that only a few endpoints will be supported here anyways,
it's not that problematic to have the manually written data structure.

@mathetake mathetake marked this pull request as ready for review December 5, 2024 19:53
@mathetake mathetake requested a review from zirain December 5, 2024 23:14
@mathetake mathetake requested a review from wengyao04 December 6, 2024 16:39
@mathetake
Copy link
Member Author

Will merge next Monday unless someone screams!

@Krishanx92
Copy link
Contributor

LGTM. Create #37 to discussed concerns separately.

Signed-off-by: Takeshi Yoneda <[email protected]>
@mathetake mathetake merged commit 683c3a2 into main Dec 9, 2024
6 checks passed
@mathetake mathetake deleted the translatorimpl branch December 9, 2024 17:06
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.

3 participants