Skip to content

Changing the message processing pipeline#17

Open
AmarskiyArtem wants to merge 2 commits intoSimulatorML:mainfrom
AmarskiyArtem:Changing_the_message_processing_pipeline
Open

Changing the message processing pipeline#17
AmarskiyArtem wants to merge 2 commits intoSimulatorML:mainfrom
AmarskiyArtem:Changing_the_message_processing_pipeline

Conversation

@AmarskiyArtem
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Collaborator

@sokolgood sokolgood left a comment

Choose a reason for hiding this comment

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

А так нормик, спс

Поправь плс, чтобы код почище был, о чем я написал

return msg_features

# The second check using GPT if rule based model is marked as not spam
gpt_msg_features = {"label": None, "reasons": None, "model_name": "None",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

как будто необязательно заводить еще один словарь с такими же ключами

можно использовать старый

response = response[0]
logger.info(response)
keys = ['label', 'reasons', 'prompt_tokens', 'completion_tokens', 'time_spent', 'prompt_name']
for key, value in zip(keys, response.values()):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

в response лежит это:
{
"label": None,
"reasons": "Input is missing required columns.",
"prompt_tokens": 0,
"completion_tokens": 0,
"time_spent": 0,
"prompt": None,
}
в целом можно не делать такие странные итерации, а просто for key, value in response.items()

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.

2 participants