Skip to content

fix: langchain and remove failing test check #1187

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

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Conversation

himanshu-dixit
Copy link
Member

@himanshu-dixit himanshu-dixit commented Jan 14, 2025

Important

Update default runtime in LangchainToolSet and remove failing test check in base.toolset.spec.ts.

  • LangchainToolSet:
    • Update default runtime to LangchainToolSet.FRAMEWORK_NAME in langchain.ts.
  • Tests:
    • Remove .failing from "should execute an file upload" test in base.toolset.spec.ts.

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

Copy link

vercel bot commented Jan 14, 2025

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

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 14, 2025 6:30am

@himanshu-dixit himanshu-dixit merged commit 46b606e into develop Jan 14, 2025
10 of 11 checks passed
@himanshu-dixit himanshu-dixit deleted the fix-langchain branch January 14, 2025 06:30
@@ -34,7 +34,7 @@ export class LangchainToolSet extends BaseComposioToolSet {
super({
apiKey: config.apiKey || null,
baseUrl: config.baseUrl || COMPOSIO_BASE_URL,
runtime: config?.runtime || null,
runtime: config?.runtime || LangchainToolSet.FRAMEWORK_NAME,

Choose a reason for hiding this comment

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

The default runtime should not be hardcoded to the framework name. This prevents users from omitting the runtime parameter when initializing the LangchainToolSet.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
runtime: config?.runtime || LangchainToolSet.FRAMEWORK_NAME,
runtime: config?.runtime || this.FRAMEWORK_NAME,

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

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 0552109 in 9 seconds

More details
  • Looked at 26 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. js/src/sdk/base.toolset.spec.ts:159
  • Draft comment:
    Ensure that the test case is passing after removing the .failing modifier. If the test is still failing, investigate the cause before removing the modifier.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The change in the test file removes the 'failing' modifier from a test case. This suggests that the test is expected to pass now. However, the test case should be verified to ensure it is indeed passing and that the change is intentional.

Workflow ID: wflow_gG3Kv60OoxDHRwPo


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

@@ -34,7 +34,7 @@ export class LangchainToolSet extends BaseComposioToolSet {
super({
apiKey: config.apiKey || null,
baseUrl: config.baseUrl || COMPOSIO_BASE_URL,
runtime: config?.runtime || null,
runtime: config?.runtime || LangchainToolSet.FRAMEWORK_NAME,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good change to set LangchainToolSet.FRAMEWORK_NAME as default runtime. Consider adding a comment explaining why this default is important for proper framework identification during tool initialization.

@@ -156,7 +156,7 @@ describe("ComposioToolSet class tests", () => {
expect(executionResultAfterRemove.data.title).toBe("Test issue");
});

it.failing("should execute an file upload", async () => {
it("should execute an file upload", async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a grammatical error in the test description: "an file upload" should be "a file upload". Also, since this test is no longer marked as failing, it would be helpful to add a comment explaining what changes made it pass.

@shreysingla11
Copy link
Collaborator

Code Review Summary

Changes Overview

  1. Set default runtime to LangchainToolSet.FRAMEWORK_NAME in LangchainToolSet
  2. Enabled previously failing file upload test

Code Quality Assessment

  • ✅ Changes are focused and minimal
  • ✅ Runtime configuration change improves framework identification
  • ⚠️ Minor documentation improvements suggested
  • ⚠️ Grammar fix needed in test description

Suggestions

  1. Add documentation explaining the importance of the runtime default value
  2. Fix grammar in test description ("an file" → "a file")
  3. Document why the file upload test is now passing

Overall, the changes are well-justified and improve the codebase. The PR can be merged after addressing the minor documentation and grammar issues.

Copy link
Contributor

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-12762336150/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-12762336150/html-report/report.html

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