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

FS-73 Add grid view #46

Merged
merged 6 commits into from
Dec 9, 2024
Merged

FS-73 Add grid view #46

merged 6 commits into from
Dec 9, 2024

Conversation

mic-smith
Copy link
Collaborator

Description

Add a grid view

image

image

Changelog

  • Add datagrid from POC changes and basic styling to app styles
  • Move sidebar rendering to new sidebar component
  • Animate fileupload icon to show in progress and disable whilst uploading

@@ -60,6 +69,20 @@ async def question(question: str) -> ChatResponse:
return response


async def __get_final_answer(question: str, intent_json: dict) -> dict[str, Any]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we call this __create_final_answer

reasoning=try_pretty_print(current_scratchpad))

final_answer = await get_answer_agent().invoke(question)
update_session_chat(role="system", content=final_answer)
final_answer = {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use a dataclass for this instead?

from typings import Optional
from dataclasses import dataclass

@dataclass
class FinalAnswer:
    message: Optional[str] = ""
    dataset: Optional[str] = None

@@ -20,6 +21,11 @@
engine = PromptEngine()
director_prompt = engine.load_prompt("chat_director")

@dataclass
class FinalAnswer:
message: Optional[str] = ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a mistake with this suggestion, this should be message: str = "". The Optional is saying that message can be type str or None, however, we are defaulting this to empty string so saying it can be None doesn't make sense

@mic-smith mic-smith merged commit d17eb78 into main Dec 9, 2024
4 checks passed
@mic-smith mic-smith deleted the FS-73/dataset-grid branch December 9, 2024 16:29
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

Successfully merging this pull request may close these issues.

3 participants