Replies: 1 comment
-
I asked the discord. I was close but the alternative was def chat() -> rx.Component:
return rx.box(
rx.foreach(
State.chat_history,
test
)
)
def test(messages):
return qa(messages[0], messages[1]) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm going through the tutorial in the docs for the chat app and I see in
rx.foreach
, lambda is used here:If I didn't want to use lambda, how would I go about that?
First I thought I could do:
but that was dumb.
So I though I could just convert to a function because that's what lambda is:
And then I realized idk wtf i'm doing here. For reference:
qa function
State class for chat history list
So I'm just curious at this point, how would I go about not using lambda, or is it necessary for this?
Beta Was this translation helpful? Give feedback.
All reactions