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

Added classification_location parameter in PebbloSafeLoader. #47

Conversation

rahul-trip
Copy link

Description: Add classifier_url parameter in PebbloSafeLoader, It enables following flow of code execution.

api_key classification_loc discover to local discover to cloud payload to local payload to cloud
0 local yes no Raw - (no key)
0 pebblo-cloud no no - - (no key)
1 local yes yes Raw locally classified docs
1 pebblo-cloud no yes - Raw

@rahul-trip rahul-trip requested review from srics and Raj725 June 5, 2024 18:03
@rahul-trip rahul-trip force-pushed the rahul/pebblo/classification_location branch 5 times, most recently from bb467fb to 30c51e2 Compare June 5, 2024 19:41
@rahul-trip rahul-trip force-pushed the rahul/pebblo/classification_location branch 4 times, most recently from ae09530 to 5544b59 Compare June 14, 2024 01:28
@rahul-trip rahul-trip force-pushed the rahul/pebblo/classification_location branch from 1b13f3a to 7729af6 Compare June 17, 2024 17:42
_discover_sent: bool = False #: :meta private:
classifier_location: str = "local" #: :meta private:
"""Classifier location. It could be either of 'local' or 'pebblo-cloud'."""
_discover_sent = False #: :meta private:
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the use of _discover_sent and _prompt_sent? They are only set and never used in the code. Additionally, since these are class-level variables, how will they work with multiple prompt requests?

Copy link
Author

@rahul-trip rahul-trip Jun 20, 2024

Choose a reason for hiding this comment

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

These flags are not intended to be used within the code, but by the end user.
The end user user can check the status of discovery or prompt/document payload sent successfully or not.
Currently they are only for pebblo-server, can be enhanced for pebblo-cloud as well.

To fix _prompt_sent, now I have intentionally set it to False in the beginning of _call method.

@rahul-trip rahul-trip force-pushed the rahul/pebblo/classification_location branch 3 times, most recently from 7919297 to 1903c15 Compare June 22, 2024 21:02
Signed-off-by: Rahul Tripathi <[email protected]>
@rahul-trip rahul-trip force-pushed the rahul/pebblo/classification_location branch from 1903c15 to 50c835b Compare June 22, 2024 21:16
@Raj725
Copy link
Collaborator

Raj725 commented Jun 25, 2024

Closing this PR since the changes are already merged into langchain-ai/master via langchain-ai#22565.

@Raj725 Raj725 closed this Jun 25, 2024
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