BuilderIO / ai-shell

A CLI that converts natural language to shell commands.
MIT License
4.04k stars 257 forks source link

Using Cloudflare proxy as OPENAI_API_ENDPOINT fails to generate correct script #44

Closed cqlzliang closed 1 year ago

cqlzliang commented 1 year ago

I have configured the OpenAI API Endpoint address to use Cloudflare proxy API (e.g. https://github.com/x-dr/chatgptProxyAPI), and I have encountered an issue where the generated script is incorrect.

Upon investigation, I found that this may be due to a single "data:" line was split into multiple chunks, and the code stream-to-iterable.ts didn't consider this situation. This causes errors in subsequent processing, leading to the incorrect script.

Thank you for your attention and support, and I look forward to your response.

steve8708 commented 1 year ago

released in v0.1.13!