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

Streaming id location #21

Closed
walseb opened this issue May 6, 2023 · 3 comments
Closed

Streaming id location #21

walseb opened this issue May 6, 2023 · 3 comments

Comments

@walseb
Copy link

walseb commented May 6, 2023

Hello!

I have been trying out the streaming branch, and it's excellent so far.

One minor issue I have with it is that it puts the ID of the block that's being streamed in at the end of the source block, inside the contents.

It might be better to put it inside the SRC header line, so it's not present in the contents.

That would make it easier to copy the text while it's being streamed in, especially when using functions that copy the entire block contents, excluding the header arguments and such.

For instance, it could look something like this:

#+BEGIN_SRC assistant :sender assistant :stream-id ...

The block id would then be removed when the stream is completed, just as it is at the moment.

Perhaps there are some downsides to this. Thoughts?

@walseb walseb changed the title Streaming id Streaming id location May 6, 2023
@walseb
Copy link
Author

walseb commented May 7, 2023

It occurred to me that it might be much safer to put the ID in the header, in case the AI API returns a UUID that may be confused with the UUID used to identify where to put the streamed in content.

This wouldn't be an issue if the UUID was in the header, since the header can't be written to by any AI API.

@tyler-dodge
Copy link
Owner

Switched out to using the stream-id in the header, I think it's better, but was a less direct implementation from the non-streaming implementation.

9803332

@walseb
Copy link
Author

walseb commented May 9, 2023

That's great, thank you!

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