langflow icon indicating copy to clipboard operation
langflow copied to clipboard

add RoutedPrompt.py

Open YamonBot opened this issue 1 year ago • 4 comments

A component that selects a prompt to be delivered to the model based on vector similarity, reflecting the latest structure of Langchain version 0.2.

YamonBot avatar Jul 04 '24 08:07 YamonBot

@ogabrielluiz

Hey~~

We would like to call an edit window for the Prompt type in the form of a List, but it doesn't seem to be supported at the moment. Can we make a suggestion regarding this? Currently, it is being delivered as a list of Str.

YamonBot avatar Jul 04 '24 08:07 YamonBot

@ogabrielluiz

Hey~~

We would like to call an edit window for the Prompt type in the form of a List, but it doesn't seem to be supported at the moment. Can we make a suggestion regarding this? Currently, it is being delivered as a list of Str.

Hey @YamonBot

How are you? I'm not sure I understand what you mean.

Also, the prompt now is a Message object, check out the other PromptComponent to see how we are handling it.

ogabrielluiz avatar Jul 04 '24 11:07 ogabrielluiz

@ogabrielluiz Hey~~ We would like to call an edit window for the Prompt type in the form of a List, but it doesn't seem to be supported at the moment. Can we make a suggestion regarding this? Currently, it is being delivered as a list of Str.

Hey @YamonBot

How are you? I'm not sure I understand what you mean.

Also, the prompt now is a Message object, check out the other PromptComponent to see how we are handling it.

Thank you for the quick response. Since this is still a draft, I have not utilized the Message/Data object yet. My explanation was insufficient. I want a format where I can press the plus button to directly add N number of Message objects via a prompt editing popup. However, the isList option doesn't work with the Text or Message types.

image

image

image

In other words, I want the items in the list to behave like the old style where Input_type = "Prompt" when clicked.

YamonBot avatar Jul 04 '24 11:07 YamonBot

@ogabrielluiz Hey~~ We would like to call an edit window for the Prompt type in the form of a List, but it doesn't seem to be supported at the moment. Can we make a suggestion regarding this? Currently, it is being delivered as a list of Str.

Hey @YamonBot How are you? I'm not sure I understand what you mean. Also, the prompt now is a Message object, check out the other PromptComponent to see how we are handling it.

Thank you for the quick response. Since this is still a draft, I have not utilized the Message/Data object yet. My explanation was insufficient. I want a format where I can press the plus button to directly add N number of Message objects via a prompt editing popup. However, the isList option doesn't work with the Text or Message types.

image

image

image

In other words, I want the items in the list to behave like the old style where Input_type = "Prompt" when clicked.

I think you should take a look at the CreateData component and do something similar. Just a word of advice: you'll have to update the post_code_processing method to make your RoutedPrompt component work with more than one prompt

ogabrielluiz avatar Jul 05 '24 16:07 ogabrielluiz

@ogabrielluiz Hey~~ We would like to call an edit window for the Prompt type in the form of a List, but it doesn't seem to be supported at the moment. Can we make a suggestion regarding this? Currently, it is being delivered as a list of Str.

Hey @YamonBot How are you? I'm not sure I understand what you mean. Also, the prompt now is a Message object, check out the other PromptComponent to see how we are handling it.

Thank you for the quick response. Since this is still a draft, I have not utilized the Message/Data object yet. My explanation was insufficient. I want a format where I can press the plus button to directly add N number of Message objects via a prompt editing popup. However, the isList option doesn't work with the Text or Message types. image image image In other words, I want the items in the list to behave like the old style where Input_type = "Prompt" when clicked.

I think you should take a look at the CreateData component and do something similar. Just a word of advice: you'll have to update the post_code_processing method to make your RoutedPrompt component work with more than one prompt

Yes, I found another way for that component. Thank you. I will proceed.

YamonBot avatar Jul 10 '24 07:07 YamonBot