mirror of
https://github.com/run-llama/create-llama.git
synced 2026-07-16 11:04:26 -04:00
Use reflex for Python full-stack #83
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marcusschiesser on GitHub (Oct 14, 2024).
Originally assigned to: @marcusschiesser on GitHub.
@marcusschiesser commented on GitHub (Oct 15, 2024):
could be based on https://github.com/reflex-dev/reflex-examples/pull/269
@elviskahoro commented on GitHub (Oct 16, 2024):
@marcusschiesser this might be better:
https://github.com/reflex-dev/reflex-llamaindex-template
Still have a bunch of features I want to add to the chat app
@marcusschiesser commented on GitHub (Oct 17, 2024):
@elviskahoro thanks for the input! Our goal is to have the Reflex template as similar to the NextJS template as possible, so we will first extract some UI components from the NextJS template: https://github.com/run-llama/create-llama/issues/382
Then, we can use them in our upcoming Reflex template. So, the structure of our Reflex template will be based on your code, but we will use the chat components of https://github.com/run-llama/create-llama/issues/382.
You might even consider using them yourself, as they have a lot of features, e.g. widgets for LLM tools, image and document uploads and viewers, etc.
@marcusschiesser commented on GitHub (Oct 29, 2024):
@elviskahoro I tried using our chat-ui components in your chat example (just the chat messages for the start), see https://github.com/reflex-dev/reflex-examples/pull/278
I am not sure how to use object parameters in
rx.Component, so I guess, that's why I am running in this error below. Would be great if you can have a look.@marcusschiesser commented on GitHub (Oct 30, 2024):
This issue is solved (it was just caused by pydantic validation).
Then I ran into the issue that my component is importing CSS, so I temporarily removed the CSS in this PR for chat-ui: https://github.com/run-llama/chat-ui/pull/8
When I now use @elviskahoro's chat app (with this updated code: https://github.com/reflex-dev/reflex-examples/pull/278/files) and use
bun linkto link the local code from my PR: https://github.com/run-llama/chat-ui/pull/8 into Reflex's.webdirectoryThen the app is rendered:

but if i enter some text the rendering of the

chat-uicomponent is triggered and I am getting this error:This doesn't happen in pure React: If you use the
ChatMessagestandalone aChatMessageProvideris wrapped, see https://github.com/run-llama/chat-ui/blob/2e7a19e216aa0cccc734c414551e244fba2e1373/packages/chat-ui/src/chat/chat-message.tsx#L53The first error in the console log is actually:
My best guess is that we're having two react versions -
chat-uihasreactaspeerDepedencyMaybe
bun linkis not working correctly?@marcusschiesser commented on GitHub (Nov 4, 2024):
Blocked by the following error using
chat-ui0.0.5:@marcusschiesser commented on GitHub (Nov 17, 2024):
chat-ui is now working with Reflex, but we will use the approach in #421 instead for greater flexibility