64bit / async-openai

Rust library for OpenAI
https://docs.rs/async-openai
MIT License
1.11k stars 165 forks source link

Add cloudflare wasm worker example #178

Closed ifsheldon closed 8 months ago

ifsheldon commented 8 months ago

This adds a working cloudflare wasm worker example.

A remaining issue is that this example must be moved out of the parent async-openai directory to get compiled, because cargo resolves dependencies of examples altogether, but wasm-bindgen causes conflicts between this example and openai-web-app example. This one uses older wasm-bindgen while the other requires newer one.

If the example is enough, you can also consider merging the code in experiments branch into main.

64bit commented 8 months ago

Thank you for the PR.

I want to remind you of expectations from my comment .

I'm sorry but I don't seem to have bandwidth to maintain this big of a change in main anytime in the near future.

However, I'm happy to accept WASM related changes in experiments as long as you want to contribute.

Thank you for your understanding again!