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

Prompt Drivers Crash When Streaming Without A Structure #643

Open
1 task done
collindutter opened this issue Feb 12, 2024 · 7 comments
Open
1 task done

Prompt Drivers Crash When Streaming Without A Structure #643

collindutter opened this issue Feb 12, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@collindutter
Copy link
Member

Describe the bug
Prompt Drivers require structure to be set in order to publish CompletionChunkEvents.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Prompt Driver without a Structure.
  2. Try streaming.
  3. Observe a crash here.

Expected behavior
Prompt Drivers should not depend on a Structure just to stream. Perhaps they should take in an event_listener: EventListener instead of a structure: Structure. If a Structure is the one using the Prompt Driver, it can provide an EventListener. Otherwise we can default one.

Screenshots
N/A

Desktop (please complete the following information):
N/A

Additional context
Add any other context about the problem here.

@collindutter collindutter added the bug Something isn't working label Feb 12, 2024
@torabshaikh
Copy link
Contributor

@collindutter Can I do it?

@collindutter
Copy link
Member Author

@torabshaikh sure! Thanks :)

@collindutter
Copy link
Member Author

Hey @torabshaikh, just checking in to see if you had any questions on this! Let us know if there's anything we can do to help.

@torabshaikh
Copy link
Contributor

@collindutter I have started working on it. I will surely ask you if I have any doubts.

@torabshaikh
Copy link
Contributor

Hi @collindutter , I have replaced structure: Structure with event_listener: EventListener but there is an issue. preprocess method inside PromptTask takes a structure. And an structure can have multiple event_listener. This is breaking the flow since we can't assign a list of EventListener to a single EventListener .

@collindutter
Copy link
Member Author

@torabshaikh can you make it so the Prompt Driver takes event_listeners: list[EventListener] instead?

@torabshaikh
Copy link
Contributor

Hi @collindutter I just submitted #914 for this. Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants