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

feat: add needle as custom component #4657

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open

Conversation

JANHMS
Copy link

@JANHMS JANHMS commented Nov 17, 2024

Overview

Really cool project, I like it. Looking forward to integrate and work with you.

  • Adding Needle as a Component to Langflow.
Screenshot 2024-12-14 at 6 13 41 PM

Needle can also generate an Answer (Full RAG)
Screenshot 2024-12-14 at 6 13 53 PM

Or retrieve the chunks and further do something with it. (Let user decide what to do with chunks.)
Screenshot 2024-12-14 at 6 01 31 PM

Screenshot 2024-12-14 at 6 01 20 PM

Depends on

Depends on my other PR, where I contribute Needle to Langchain.
langchain-ai/langchain#28157

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Nov 17, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Nov 17, 2024
@JANHMS JANHMS marked this pull request as draft November 17, 2024 17:16
@JANHMS
Copy link
Author

JANHMS commented Dec 7, 2024

Picking this up now again, since Needle is now officially available in Langchain Community Package:
https://python.langchain.com/docs/integrations/retrievers/needle/
https://needle-ai.com

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 8, 2024
Copy link

codspeed-hq bot commented Dec 8, 2024

CodSpeed Performance Report

Merging #4657 will degrade performances by 43.9%

Comparing JANHMS:main (99f989a) with main (ba6f518)

Summary

⚡ 2 improvements
❌ 3 regressions
✅ 10 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main JANHMS:main Change
test_get_and_cache_all_types_dict 950.9 µs 1,347.1 µs -29.41%
test_load_flows 2.4 ms 1.1 ms ×2.2
test_setup_llm_caching 1.2 ms 2.1 ms -43.9%
test_successful_run_with_input_type_text 161.6 ms 194.6 ms -16.95%
test_successful_run_with_output_type_any 242.5 ms 147.9 ms +63.95%

@JANHMS JANHMS marked this pull request as ready for review December 9, 2024 09:43
@ogabrielluiz ogabrielluiz linked an issue Dec 10, 2024 that may be closed by this pull request
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

Hey @JANHMS

How are you?

Thank you for this!

Copy link
Contributor

Choose a reason for hiding this comment

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

This inherits from CustomComponent instead of Component which is the standard since 1.0.

ChatGPT or our Custom Component Generator template might be able to help you migrate it. You can use an example component like NotDiamondComponent.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks man! Will have a look!

Copy link
Author

Choose a reason for hiding this comment

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

@ogabrielluiz I adjusted now. Works fine.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 14, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 14, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 14, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 14, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 14, 2024
@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 14, 2024
@JANHMS JANHMS requested a review from ogabrielluiz December 14, 2024 17:58
@JANHMS
Copy link
Author

JANHMS commented Dec 14, 2024

@ogabrielluiz worked on this a bit this Saturday afternoon. Should be ok now using the Component and being able to be used with other components.

@github-actions github-actions bot added enhancement New feature or request and removed enhancement New feature or request labels Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Langchain to 0.3.10
2 participants