S
Solara4mo ago
Cezik

Hello, has anyone encountered something like this where the ChatMessage component does not display

Hello, has anyone encountered something like this where the ChatMessage component does not display the username above the message? I am using the TrainChatMessage component (my abstraction for a recurring component) and I am also attaching a screenshot of the application. I checked on pycafe with the example from the documentation and it correctly attaches the specified name over the message.
@solara.component
def TrainChatMessage(
message: TrainMessage,
):
with solara.lab.ChatMessage(
user=message['role'] == Role.USER,
name='User' if message['role'] == Role.USER else 'System',
avatar_background_color='primary',
color='#292929',
border_radius='20px',
notch=True,
):
solara.Markdown(message['content'])
@solara.component
def TrainChatMessage(
message: TrainMessage,
):
with solara.lab.ChatMessage(
user=message['role'] == Role.USER,
name='User' if message['role'] == Role.USER else 'System',
avatar_background_color='primary',
color='#292929',
border_radius='20px',
notch=True,
):
solara.Markdown(message['content'])
No description
15 Replies
jay
jay4mo ago
discord account nuker broncode @here
Cyrus
Cyrus4mo ago
Hi, I am trying to test auth with solara. I am noticing that the redirect_uri query param in the url of this request to the auth provider is not the same as the one that I pass to solara here. Instead of being something like {my_base_url}/_solara/auth/authorize it is http://{ip}:{port}/_solara/auth/authorize, which is not one of the allowed urls in the auth provider config, leading to a browser error. I tried setting SOLARA_BASE_URL=my_base_url but it did not work. Do you know where that redirect comes from and how I can overwrite it? Thanks!
MaartenBreddels
MaartenBreddels4mo ago
Did you check the https://solara.dev/documentation/advanced/enterprise/oauth possible issues section? I'm not sure what you mean by {http//:{ip_server}:{host}/_solara/auth/authorize ip and host combined doesn't seem correct
Using OAuth in your Solara app
Open Authorization can be readily integrated into your Solara applications via the Solara-Enterprise package.
Cyrus
Cyrus4mo ago
Sorry, I meant to say http://{ip}:{port} (typo). And yes I did see the docs, and it mentions to set SOLARA_BASE_URL=my_base_url to overwrite any defaults that solara might be using. But it seems like the default is still not being overwritten in this request because when I print out the request.session content I see something like
{
"data": {
"redirect_uri": "some_default_that_is_not_my_base_url/_solara/auth/authorize",
"nonce": "some_random_string",
"url": "https://{api_base_url}/oauth2/v1/authorize?response_type=code&client_id=xxxxxxxxxx&redirect_uri=some_default_that_is_not_my_base_url/_solara/auth/authorize&scope=openid+profile+email&state=some_long_string&nonce=some_long_string"
}
}
{
"data": {
"redirect_uri": "some_default_that_is_not_my_base_url/_solara/auth/authorize",
"nonce": "some_random_string",
"url": "https://{api_base_url}/oauth2/v1/authorize?response_type=code&client_id=xxxxxxxxxx&redirect_uri=some_default_that_is_not_my_base_url/_solara/auth/authorize&scope=openid+profile+email&state=some_long_string&nonce=some_long_string"
}
}
As the docs also say I should double check how HOST headers are being sent. Will let you know how that goes. Thanks!
izumi.qu
izumi.qu4mo ago
is these a bug or there is a correct way of using filter with cell_actions? @solara.component def CrossFilterDataFrame_mod( df, items_per_page=20, column_actions: List[ColumnAction] = [], cell_actions: List[CellAction] = [], scrollable=False, ): dff = df filter, set_filter = solara.use_cross_filter(id(df), "dataframe") if filter is not None: dff = df[filter] return solara.DataFrame( dff, items_per_page=items_per_page, scrollable=scrollable, column_actions=column_actions, cell_actions=[ solara.CellAction( icon=action.icon, name=action.name, on_click=lambda row, col, action=action: action.on_click(row, col, dff), ) for action in cell_actions ], ) a modified cell_actions which work fine in my case
dguerrero
dguerrero4mo ago
is there a way to change the version of fontawesome that is used in solara? I would like to use the latest v6 version, solara uses 5
MaartenBreddels
MaartenBreddels4mo ago
yes, we have https://github.com/widgetti/solara/blob/ce584ee660f30413706dfcc44148941c61b0149a/solara/server/settings.py#L82 which you can also set as env var: SOLARA_ASSETS_FONTAWESOME_PATH
Monty Python
Monty Python4mo ago
solara/server/settings.py line 82
fontawesome_path: str = "/[email protected]/css/font-awesome.min.css"
fontawesome_path: str = "/[email protected]/css/font-awesome.min.css"
izumi.qu
izumi.qu4mo ago
how Can I generate a wordcloud such like bar echarts? https://github.com/ecomfe/echarts-wordcloud?tab=readme-ov-file
GitHub
GitHub - ecomfe/echarts-wordcloud: Word Cloud extension based on Ap...
Word Cloud extension based on Apache ECharts and wordcloud2.js - ecomfe/echarts-wordcloud
izumi.qu
izumi.qu4mo ago
it is a third-parts extension for echarts...
No description
Dheeraj
Dheeraj4mo ago
hey ...what is minimum cpu and memory required to run solara application ? @everyone
dvein
dvein4mo ago
how to download solara
MaartenBreddels
MaartenBreddels4mo ago
this is not about roblox I think plotly does wordcloud
Cyrus
Cyrus4mo ago
Hi is there a way to force a solara application to use https scheme/protocol for redirect URIs (for auth). I tried setting SOLARA_SESSION_HTTPS_ONLY=True but it didn't work (more details in question-issue). Thanks!
mike
mike4mo ago
Hi, I've been working with solara using Jupyter, and have been impressed with the project. We were interested in embedding it within a web app using Pyodide. I looked at PyCafe and it seems like a great project, but really need something we can embed in our app. Just wondering if there's any updated documentation on how to get started using Pyodide with solara. Using micropip to install solara-server gives me errors on tornado and a few others
Want results from more Discord servers?
Add your server