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

Replace ChatterBot's "sessions" with "Conversations" #828

Merged
merged 28 commits into from
Aug 8, 2017

Conversation

gunthercox
Copy link
Owner

This pull request is currently a work-in-progress.

For #811 to create consistent sessions that are tracked in the database instead of in memory.
Closes #513 by replacing it.

@gunthercox gunthercox force-pushed the conversations branch 2 times, most recently from 16d5d04 to 21aaecd Compare July 8, 2017 12:43
Returns the latest response in a conversation if it exists.
Returns None if a matching conversation cannot be found.
"""
from django.apps import apps
Copy link
Collaborator

Choose a reason for hiding this comment

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

from django.apps import apps are many places, instead can we import one time on top of the page?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Importing third party packages at the top of a file sometimes causes unexpected errors depending on how users install ChatterBot. The best way (that I have found) to avoid this is to protect the imports by placing them inside of a method as this prevents them from being imported when the file is loaded. I'm actually not certain why some people encounter the import errors but it seems that it may be the result of less conventional (but still somewhat valid) installation methods such as installing directly through setup.py commands.

@gunthercox gunthercox force-pushed the conversations branch 3 times, most recently from bdcee61 to 927d501 Compare July 17, 2017 00:25
migrations.DeleteModel(
name='Phrase',
),
]
Copy link
Owner Author

Choose a reason for hiding this comment

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

  • Remember to squash and re-generate these migrations.

@gunthercox gunthercox force-pushed the conversations branch 2 times, most recently from 05c9618 to 3473bab Compare July 20, 2017 00:13
@vkosuri
Copy link
Collaborator

vkosuri commented Jul 20, 2017

💯

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