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

add efficient_chat_with_ai #2800

Merged
merged 7 commits into from
Apr 8, 2024
Merged

add efficient_chat_with_ai #2800

merged 7 commits into from
Apr 8, 2024

Conversation

merlinarer
Copy link
Contributor

add an efficient chat_with_ai example discussed in here

@falkoschindler falkoschindler self-requested a review April 1, 2024 19:16
@falkoschindler falkoschindler added this to the 1.4.21 milestone Apr 3, 2024
@falkoschindler falkoschindler added the documentation Improvements or additions to documentation label Apr 3, 2024
@falkoschindler
Copy link
Contributor

Thanks for the pull request, @merlinarer!

In order to keep it simple and more close to the original example, I updated the latter with the idea of incrementally building the UI from yours. Unfortunately, I'm always getting a rate limit when testing the UI. Can you or @rodja try if it works with your key?

@rodja
Copy link
Member

rodja commented Apr 5, 2024

I made some changes to display error messages and fixed getting the content from a chunk. But somehow the response is still not streamed.@merlinarer, could you look into this?

@merlinarer
Copy link
Contributor Author

@rodja Have you tried my commit? I had already made it into streaming style.

@rodja
Copy link
Member

rodja commented Apr 8, 2024

@merlinarer Yes, in examples/efficient_chat_with_ai the streaming works. @falkoschindler tried to move the ideas to examples/chat_with_ai because we rather would like to have only one very well working example. Maybe you can have a look at the implementation?

@merlinarer
Copy link
Contributor Author

@rodja @falkoschindler I abandoned ConversationChain, which would have some conflict with stream mode. Moreover, using config={"callbacks": [NiceGuiLogElementCallbackHandler(log)] is an alternative to set callbacks.

Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! It works really nicely now. 🙂
Thanks a lot for the contribution, @merlinarer!

@falkoschindler falkoschindler merged commit f66f995 into zauberzeug:main Apr 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants