Skip to content

[llm-polyglot] Add Azure OpenAI support to the polyglot#86

Closed
RollForReflex wants to merge 7 commits into
mainfrom
feature/azure-polyglot
Closed

[llm-polyglot] Add Azure OpenAI support to the polyglot#86
RollForReflex wants to merge 7 commits into
mainfrom
feature/azure-polyglot

Conversation

@RollForReflex

@RollForReflex RollForReflex commented Dec 31, 2024

Copy link
Copy Markdown
Contributor

Important

Adds Azure OpenAI support to llm-polyglot, including a new provider class, environment variables, documentation, and tests.

  • Azure OpenAI Support:
    • Adds AzureOpenAIProvider class in src/providers/azure/index.ts.
    • Updates LLMClient in src/index.ts to support azure-openai provider.
    • Adds Azure-specific options to LLMClientOptions in src/types/index.ts.
  • Environment Variables:
    • Adds AZURE_OPENAI_API_KEY and AZURE_OPENAI_ENDPOINT to test-pr.yml, test.yml, and turbo.json.
  • Documentation:
    • Updates README.md to include Azure OpenAI installation and usage instructions.
  • Dependencies:
    • Adds @azure/openai to peerDependencies and devDependencies in package.json.
  • Testing:
    • Adds azure-oai.test.ts for Azure OpenAI provider tests.

This description was created by Ellipsis for 0d46236. It will automatically update as commits are pushed.

@changeset-bot

changeset-bot Bot commented Dec 31, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0d46236

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
llm-polyglot Minor

Not sure what this means? Click here to learn what changesets are.

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

@vercel

vercel Bot commented Dec 31, 2024

Copy link
Copy Markdown

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 Jan 4, 2025 4:33pm

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 8024004 in 37 seconds

More details
  • Looked at 294 lines of code in 11 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. .github/workflows/test-pr.yml:25
  • Draft comment:
    The environment variable AZURE_API_KEY should be AZURE_OPENAI_API_KEY to be consistent with the naming convention used in test.yml.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    While consistency in naming conventions is good, I can't verify if this is actually inconsistent since I can't see test.yml. The comment could be correct, but without seeing the other file, I can't be certain. Following the principle of removing comments unless there's strong evidence they're correct, this should be removed.
    The naming convention could be important for the application to work correctly, and removing this comment might lead to integration issues.
    If the naming is critical for functionality, it would be caught by tests or build failures. This is more of a style suggestion that we can't verify without more context.
    Delete the comment since we can't verify its accuracy without seeing test.yml, and if the naming was critical, it would be caught by tests.
2. public-packages/llm-client/src/providers/anthropic/index.ts:46
  • Draft comment:
    The logger name is incorrectly set to 'GEMINI-CLIENT'. It should be 'ANTHROPIC-CLIENT'.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_dHi4gHZcBsAdCOOV


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on cd02a13 in 12 seconds

More details
  • Looked at 14 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. .github/workflows/test-pr.yml:25
  • Draft comment:
    The AZURE_API_KEY environment variable is missing. Ensure it is added if required by the code.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_JGYneopJACO8rOYR


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 223cd49 in 10 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. public-packages/llm-client/tests/azure-oai.test.ts:4
  • Draft comment:
    Ensure that environment variables AZURE_OPENAI_API_KEY and AZURE_OPENAI_ENDPOINT are set before running tests to avoid undefined errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The test setup should handle missing environment variables more gracefully.

Workflow ID: wflow_EjdtBbQLyVEneEb4


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 32c92ee in 13 seconds

More details
  • Looked at 33 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. public-packages/llm-client/src/types/index.ts:7
  • Draft comment:
    Ensure that AzureOpenAI is correctly imported from the openai package. If AzureOpenAI is not defined in the openai package, this will lead to a runtime error.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_0iYGi5UJ9O7zjHBZ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 03e101b in 39 seconds

More details
  • Looked at 31 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. public-packages/llm-client/tests/azure-oai.test.ts:4
  • Draft comment:
    Consider adding checks to ensure AZURE_OPENAI_API_KEY and AZURE_OPENAI_ENDPOINT are set before creating the client. This will prevent runtime errors if the environment variables are missing.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The tests are running successfully without the environment variables, which suggests they aren't actually required. The removal of these variables was intentional. Since this is a test file, if the environment variables were required, the tests would fail. The fact that they were removed suggests the library has default behavior or mock functionality for tests.
    Maybe there's some configuration I'm not seeing that makes these variables required in production but not in tests? Maybe the tests are using mock credentials internally?
    Even if that's true, this is a test file and the tests are clearly working without these variables. The comment is suggesting adding complexity that the tests demonstrate isn't needed.
    Delete the comment. The tests prove the environment variables aren't required, and the removal was intentional.
2. public-packages/llm-client/tests/azure-oai.test.ts:5
  • Draft comment:
    Consider making the model name configurable or checking its availability to avoid potential issues if the model name changes or is unavailable.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The test file uses a specific model name 'gpt-4o-mini' which might not be available or could change. It's better to make this configurable.

Workflow ID: wflow_CllaLx6uh6G3pXnL


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipped PR review on 9a31193 because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.

@ellipsis-dev ellipsis-dev Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 0d46236 in 8 seconds

More details
  • Looked at 11 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. .changeset/ten-buttons-scream.md:1
  • Draft comment:
    The changeset file is correctly formatted and provides a clear description of the change. No issues here.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The changeset file is correctly formatted and provides a clear description of the change. No issues here.

Workflow ID: wflow_9P5qvgCPtLI4H6sZ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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