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

openai[minor]: Cherry pick OpenAI changes into 0.1 #5350

Merged
merged 1 commit into from
May 14, 2024

Conversation

jacoblee93
Copy link
Collaborator

Cherry pick OpenAI changes into 0.1

@sarangan12 @bracesproul

* Update OpenAI with Azure Specific Code

* Export Embeddings

* Add deployment parameters

* Check to fix build issue

* Update libs/langchain-openai/src/azure/embeddings.ts

Co-authored-by: Brace Sproul <braceasproul@gmail.com>

* Update libs/langchain-openai/src/azure/embeddings.ts

Co-authored-by: Brace Sproul <braceasproul@gmail.com>

* nit changes

* Update Test Descriptions

* Format

* Fix types

---------

Co-authored-by: Brace Sproul <braceasproul@gmail.com>
Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
Copy link

vercel bot commented May 14, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 0:20am
langchainjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 14, 2024 0:20am

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label May 14, 2024
@jacoblee93
Copy link
Collaborator Author

Release to follow

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label May 14, 2024
@@ -1291,7 +1291,7 @@
"node-llama-cpp": "2.7.3",
Copy link

Choose a reason for hiding this comment

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

Hey there! 👋 Just wanted to flag that the change in the "openai" package version from "^4.32.1" to "^4.41.1" might impact the project's dependencies. This is for the maintainers to review and ensure it aligns with the intended dependency type (peer/dev/hard). Keep up the great work!

@@ -41,11 +41,12 @@
"dependencies": {
Copy link

Choose a reason for hiding this comment

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

Hey there! 👋 I noticed that the package.json file has been updated with changes to peer and dev dependencies, including an update to the "openai" peer dependency and the addition of a new dev dependency "@azure/identity". I'm flagging this for your review. Keep up the great work! 🚀

@@ -48,6 +43,57 @@ export class AzureChatOpenAI extends ChatOpenAI {
super(newFields);
Copy link

Choose a reason for hiding this comment

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

Hey team, I've flagged this PR for your review as it includes changes related to accessing environment variables for the Azure OpenAI API configuration. Please take a look to ensure the handling of environment variables aligns with best practices.

@@ -0,0 +1,98 @@
import {
Copy link

Choose a reason for hiding this comment

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

Hey team, I've flagged this PR for your review as it introduces a new external HTTP request using the AzureOpenAIClient in the embeddingWithRetry method. Please take a look and ensure it aligns with our project's requirements.

@@ -0,0 +1,829 @@
import { test, jest, expect } from "@jest/globals";
Copy link

Choose a reason for hiding this comment

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

Hey team, I've reviewed the PR and noticed that it explicitly accesses and requires environment variables via getEnvironmentVariable. This comment is to flag this change for your review. Let me know if you need any further assistance with this.

@@ -0,0 +1,333 @@
import { test, expect } from "@jest/globals";
Copy link

Choose a reason for hiding this comment

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

Hey there! I've reviewed the code changes and noticed that the addition of environment variable access via getEnvironmentVariable function. I've flagged this for your review to ensure proper handling of environment variables. Let me know if you need further assistance with this.

@jacoblee93 jacoblee93 changed the title openai[minor]: Update OpenAI with Azure Specific Code (#5323) openai[minor]: Cherry pick OpenAI changes into 0.1 May 14, 2024
@jacoblee93 jacoblee93 merged commit 58c2655 into v0.1 May 14, 2024
19 checks passed
@jacoblee93 jacoblee93 deleted the jacob/v0.1-openai branch May 14, 2024 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants