Exodia
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
Yes I think that makes sense, I'd add a new trait class and have 'on_submit' inside the button update it somehow
13 replies
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
13 replies
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
Here is the code I currently have based of a chat bot in solara example to help clarify
13 replies
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
So it's quite close to the functionality we desire I think. I'd await the two async functions from an external test to achieve the get functionality
I would create a traitless object I assume for both the user and system inputs, recording them all.
But I think by default traitless observes any change, is there a way to tie this into an IconButton?
So that only when the user hits submit changes are observed
13 replies
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
Thanks a lot! will dig into this today
13 replies
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
Any idea?
13 replies
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
TLDR
So due to business requirements, I need to be able to import, create and launch a solara chat ui app, as well as interact with it through its instantiated object (E. G. By sending or receiving data in a potentially blocking manner)
But perhaps there's another library better suited for all this?
13 replies
SSolara
•Created by Exodia on 1/19/2024 in #questions-issues
Communicate with app from a different file
Hey Maarten,
So in this case I wouldn't have multiple browser tabs.
It would act as a simple UI interface on a much larger system.
More context:
Unfortunately the requirement to use it as follows hasn't been set by me, , since I'll need it to be portable into various parts of a larger system, rather than have it act as an entry point.
I need to be able to write a line of code like user_input: str = chat_app.get() that blocks execution of some test until a user of the UI enters a prompt and sends it to chat. When it happens, the user's promot gets recorded in user_input variable as string, Previous solution: For example, I previously used a websocket data server and nicegui client, so that the server could make data available to the UI as in the example above, through a websocket the UI would use to update itself with, but explicitly handling async and websocket reconnections is proving to be to much trouble. Some additional reasons I chose Solara as a potential solution - as I move to a microservice Arch, it seems like a good candidate to ingest a Kafka topic for live streaming - built in async support - good examples with very similar use cases https://github.com/widgetti/wanderlust
I need to be able to write a line of code like user_input: str = chat_app.get() that blocks execution of some test until a user of the UI enters a prompt and sends it to chat. When it happens, the user's promot gets recorded in user_input variable as string, Previous solution: For example, I previously used a websocket data server and nicegui client, so that the server could make data available to the UI as in the example above, through a websocket the UI would use to update itself with, but explicitly handling async and websocket reconnections is proving to be to much trouble. Some additional reasons I chose Solara as a potential solution - as I move to a microservice Arch, it seems like a good candidate to ingest a Kafka topic for live streaming - built in async support - good examples with very similar use cases https://github.com/widgetti/wanderlust
13 replies