Ironclad / rivet

The open-source visual AI programming environment and TypeScript library
https://rivet.ironcladapp.com
MIT License
2.55k stars 226 forks source link

fix: ignore empty event lines #358

Closed Aschen closed 4 months ago

Aschen commented 4 months ago

Description

The Event Stream implementation was printing log in the console when an empty line was received.

I ignored the empty lines and also removed the log because it can flood log manager of production servers.

PS: super cool project guys, we love using it at Didask

abrenneke commented 4 months ago

Thank you @Aschen! I suppose it makes sense that there are empty lines in the event source response.

abrenneke commented 4 months ago

@all-contributors please add @Aschen for code

allcontributors[bot] commented 4 months ago

@abrenneke

I've put up a pull request to add @Aschen! :tada:

Aschen commented 4 months ago

I suppose it makes sense that there are empty lines in the event source response.

It's actually OpenAI response who contains empty line (only the \n char), they can be ignored safely