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

Addition of Azure as a supported model provider #54

Closed
wants to merge 15 commits into from

Conversation

ayaviri
Copy link

@ayaviri ayaviri commented May 4, 2024

What

Title. Now an Azure client that just uses OpenAI's service or one that points to a resource hosted on Azure can be instantiated with createLLMClient

More specifically

  • Creation of a BaseProvider class that provides a template for the addition of new providers. In order to achieve this, each Provider class is now composed with a instance of its client as opposed to being an instance since Typescript does nto support multiple inheritance. Now, the addition of a new provider only requires:
    1. Defining a new "extended" provider input parameter type (eg. Anthropic offers the "claude" series of models as opposed to the "gpt" series)
    2. Implementing the transformation from this extended input parameter type to the provider's input parameter type
    3. Implementing the transformations from the provider's API response to the extended output parameter type (eg. the original response is typically included as a field), both for streaming and non-streaming endpoints
  • Refactor of Anthropic client wrapper to use this BaseProvider class
  • Addition of Azure client wrapper
  • Client authentication was slightly changed in the createLLMClient method in order to accommodate for the myriad of ways Azure's client can be authenticated. See updated README for more. This seems a bit hacky, so I'm looking definitely looking for concrete suggestions on this

Testing

The existing test suite was reused for Azure's OpenAI models

Copy link

changeset-bot bot commented May 4, 2024

⚠️ No Changeset found

Latest commit: 41f7451

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
island-ai-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 7:04pm

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