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

Lovely... pls give a vanilla browser version #1

Open
itscvenk opened this issue Feb 21, 2024 · 4 comments
Open

Lovely... pls give a vanilla browser version #1

itscvenk opened this issue Feb 21, 2024 · 4 comments

Comments

@itscvenk
Copy link

Hi

I guess this can be used from within a browser when streaming content from OpenAi API, for example

Can you please help with some examples?

Thanks a ton

@thetarnav
Copy link
Owner

Hey, this project is very much in development so I wouldn’t recommend relying on this for any serious application yet.
But I will definitely provide some examples later.
Can you be a bit more specific about what example you are looking for?
Also what does “vanilla browser version” mean here? Like a minified js bundle to be used without any js tooling?

@itscvenk
Copy link
Author

Thank you for your prompt response!!!!

I think your code is more for nodejs, to run in the background

I just want a javascript code: that i will include after referring to your javsascript file in the html

and... just call some functions/methods in your javascript file to handle the streaming markdowns (many times incomplete) from openAi

@thetarnav
Copy link
Owner

Just so you know, the library is platform agnostic, it doesn't use any node apis, it can be used in the browser directly. Without any js tooling too.
You can use the files in this repository as an example (index.html and main.js), they are not being bundled/postprocessed in any way. This demo is statically serving the files from this repository and it just works.
But this is just a demo, and you probably wouldn't want to use this way.
I'll try to provide a single minified js file, and an example how to use it once the library is done.

@itscvenk
Copy link
Author

It is not the minified js i am after, thanks

What i mean to say is that i get the chunks of data, so obviously the markdown tags aren't complete

I am just being lazy and looking for a javascript running in a browser that will smartly close the tags when incomplete and handle the markdown

I don't know if i am clear, please let me know if i am unclear

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

2 participants