-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
@@ -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]: |
There was a problem hiding this comment.
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 = {} |
There was a problem hiding this comment.
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] = "" |
There was a problem hiding this comment.
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
1f1d9c3
to
eefebfb
Compare
Description
Add a grid view
Changelog