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

Add OpenAI processing example #16

Open
tillrohrmann opened this issue Aug 21, 2023 · 0 comments
Open

Add OpenAI processing example #16

tillrohrmann opened this issue Aug 21, 2023 · 0 comments

Comments

@tillrohrmann
Copy link
Contributor

tillrohrmann commented Aug 21, 2023

Scenario: pipe a larger CSV file through OpenAI API to create embeddings to store somewhere. Basically a mini batch-workflow across external systems. This is common for other engines (airflow, etc.) but would be great to show how simple that also is in Restate.

  • Request -> pull (stream in) CSV file (maybe from S3, whereever) in a regular handler
  • file chunked (chunks of 100 rows) and sent to a worker handler, but in parallel (rpc, but only collect promise, don't await)
  • worker handler loops over rows and makes side-effect call to API, then store in DB.
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

1 participant