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

A streaming proxy for LLM answers #79

Closed
sciabarracom opened this issue Nov 23, 2024 · 2 comments
Closed

A streaming proxy for LLM answers #79

sciabarracom opened this issue Nov 23, 2024 · 2 comments
Assignees

Comments

@sciabarracom
Copy link
Contributor

Why you need it?

LLm applications require a way to stream the results as they are generated

How it could be?

We need a stereaming proxy. It should work this way.

Since actions while produce input cannot communicate back with the frontend, they should write the temporary content in redis.

The proxy is mounted on /stream of each user with an ingress, and when it receive a request /stream/<key> it will stream the content as it arrives in the key <user>:<key>

Other related information

We should explore the best way to execute the request.

We should be able to execute a request liket how can I become rich and forget.
Normally openwhisk returns an activation id, and the result should be written in redis using this id for the streaming . So an asyncrhonous request should be more or less:

  1. webaction invoking an asyncrhonous request and returning the activation id
  2. action talking to an LLM and writing the result to redis in the key corresponding to the activtion id
@francescotimperi
Copy link
Contributor

An idea could be to use Redis/Valkey Streams. (an example here )

@sciabarracom
Copy link
Contributor Author

please check #82 as this spec is outdated

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

No branches or pull requests

4 participants