-
Notifications
You must be signed in to change notification settings - Fork 6
Include delete and actual request timestamp #34
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
Conversation
aimon/decorators/analyze.py
Outdated
@@ -192,6 +192,7 @@ def _run_production_analysis(self, func, args, kwargs): | |||
"context_docs": _context, | |||
"user_query": result_dict["user_query"] if 'user_query' in result_dict else "No User Query Specified", | |||
"prompt": result_dict['prompt'] if 'prompt' in result_dict else "No Prompt Specified" |
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.
missing a comma
@@ -9,3 +9,5 @@ | |||
|
|||
class AnalyzeCreateResponse(BaseModel): | |||
message: Optional[str] = None | |||
|
|||
status: Optional[str] = None |
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.
need this to be of type int not Optional as well
aimon/decorators/analyze.py
Outdated
@@ -191,7 +191,8 @@ def _run_production_analysis(self, func, args, kwargs): | |||
"output": result_dict['generated_text'], | |||
"context_docs": _context, | |||
"user_query": result_dict["user_query"] if 'user_query' in result_dict else "No User Query Specified", | |||
"prompt": result_dict['prompt'] if 'prompt' in result_dict else "No Prompt Specified" | |||
"prompt": result_dict['prompt'] if 'prompt' in result_dict else "No Prompt Specified", | |||
"actual_request_timestamp": result_dict['actual_request_timestamp'] if 'actual_request_timestamp' in result_dict else "" |
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.
in the SDK backend, is the actual_request_timestamp
a required field? If not, then lets add this to the payload only if it exists in the result_dict instead of setting it to empty string:
if 'actual_request_timestamp' in result_dict:
payload["actual_request_timestamp"] = result_dict['actual_request_timestamp']
@@ -9,3 +9,5 @@ | |||
|
|||
class AnalyzeCreateResponse(BaseModel): | |||
message: Optional[str] = None | |||
|
|||
status: 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.
@ramoncelestino why is this still a string?
No description provided.