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

scrollable chat history #12

Open
alexmondaini opened this issue Apr 16, 2024 · 0 comments
Open

scrollable chat history #12

alexmondaini opened this issue Apr 16, 2024 · 0 comments

Comments

@alexmondaini
Copy link

Any ideas about chat histories that over time become too large that we cannot scroll up and down and no longer fit in the page itself ? Is this a limittion of fastUI rather than your app ?

        @self.get(
            "/chat/{session_id}",
            response_model=FastUI,
            response_model_exclude_none=True,
        )
        async def chat_ui(
            session_id: Annotated[str, Path(title="The ChatHistory SessionID.")],
        ) -> list[AnyComponent]:
            """
            Main endpoint for showing the Chat UI and handling user input.
            """
            return [
                c.Page(
                    components=[
                        c.ServerLoad(
                            path=f"/chat/{session_id}/history",
                            load_trigger=PageEvent(name="chat-load"),
                            components=[],
                        ),
                        ChatInputForm(
                            submit_url=f"/api/chat/{session_id}/generate",
                            fire_page_event="chat-load",
                        ),
                    ],
                    class_name="fixed-bottom row justify-content-center row-cols-lg-2",
                )
            ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant