ChatterBot 1.2.13__tar.gz → 1.2.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {chatterbot-1.2.13 → chatterbot-1.2.14}/ChatterBot.egg-info/PKG-INFO +2 -1
- {chatterbot-1.2.13 → chatterbot-1.2.14}/ChatterBot.egg-info/requires.txt +1 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/PKG-INFO +2 -1
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/__init__.py +1 -1
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/chatterbot.py +3 -19
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/trainers.py +9 -2
- {chatterbot-1.2.13 → chatterbot-1.2.14}/pyproject.toml +2 -1
- {chatterbot-1.2.13 → chatterbot-1.2.14}/ChatterBot.egg-info/SOURCES.txt +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/ChatterBot.egg-info/dependency_links.txt +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/ChatterBot.egg-info/top_level.txt +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/LICENSE +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/README.md +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/__main__.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/adapters.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/comparisons.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/components.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/constants.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/conversation.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/corpus.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/exceptions.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/__init__.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/__init__.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/abstract_models.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/admin.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/apps.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0001_initial.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0002_statement_extra_data.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0003_change_occurrence_default.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0004_rename_in_response_to.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0005_statement_created_at.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0006_create_conversation.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0007_response_created_at.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0008_update_conversations.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0009_tags.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0010_statement_text.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0011_blank_extra_data.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0012_statement_created_at.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0013_change_conversations.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0014_remove_statement_extra_data.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0015_statement_persona.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0017_tags_unique.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0019_alter_statement_id_alter_tag_id_and_more.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0020_alter_statement_conversation_and_more.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0021_increase_text_max_length_to_1100.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/__init__.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/model_admin.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/models.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/settings.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/sqlalchemy_app/__init__.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/sqlalchemy_app/models.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/filters.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/languages.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/__init__.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/best_match.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/llm_adapters.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/logic_adapter.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/mathematical_evaluation.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/mcp_tools.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/specific_response.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/time_adapter.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/logic/unit_conversion.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/parsing.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/preprocessors.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/response_selection.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/search.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/storage/__init__.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/storage/django_storage.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/storage/mongodb.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/storage/redis.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/storage/sql_storage.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/storage/storage_adapter.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/tagging.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/utils.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/vectorstores.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/setup.cfg +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_adapter_validation.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_benchmarks.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_chatbot.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_cli.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_comparisons.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_conversations.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_corpus.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_examples.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_filters.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_initialization.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_languages.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_parsing.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_preprocessors.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_response_selection.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_search.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_tagging.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_turing.py +0 -0
- {chatterbot-1.2.13 → chatterbot-1.2.14}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ChatterBot
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.14
|
|
4
4
|
Summary: ChatterBot is a machine learning, conversational dialog engine
|
|
5
5
|
Author: Gunther Cox
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -43,6 +43,7 @@ Requires-Dist: sphinx<9.2,>=5.3; extra == "test"
|
|
|
43
43
|
Requires-Dist: sphinx-sitemap>=2.6.0; extra == "test"
|
|
44
44
|
Requires-Dist: huggingface_hub; extra == "test"
|
|
45
45
|
Requires-Dist: django<6.0,>=4.1; extra == "test"
|
|
46
|
+
Requires-Dist: click<9.0,>=8.4; extra == "test"
|
|
46
47
|
Provides-Extra: dev
|
|
47
48
|
Requires-Dist: pint>=0.8.1; extra == "dev"
|
|
48
49
|
Requires-Dist: pyyaml<7.0,>=6.0; extra == "dev"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ChatterBot
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.14
|
|
4
4
|
Summary: ChatterBot is a machine learning, conversational dialog engine
|
|
5
5
|
Author: Gunther Cox
|
|
6
6
|
License-Expression: BSD-3-Clause
|
|
@@ -43,6 +43,7 @@ Requires-Dist: sphinx<9.2,>=5.3; extra == "test"
|
|
|
43
43
|
Requires-Dist: sphinx-sitemap>=2.6.0; extra == "test"
|
|
44
44
|
Requires-Dist: huggingface_hub; extra == "test"
|
|
45
45
|
Requires-Dist: django<6.0,>=4.1; extra == "test"
|
|
46
|
+
Requires-Dist: click<9.0,>=8.4; extra == "test"
|
|
46
47
|
Provides-Extra: dev
|
|
47
48
|
Requires-Dist: pint>=0.8.1; extra == "dev"
|
|
48
49
|
Requires-Dist: pyyaml<7.0,>=6.0; extra == "dev"
|
|
@@ -354,25 +354,15 @@ class ChatBot(object):
|
|
|
354
354
|
|
|
355
355
|
if not previous_statement:
|
|
356
356
|
previous_statement = self.get_latest_response(statement.conversation)
|
|
357
|
+
if previous_statement:
|
|
358
|
+
previous_statement = previous_statement.text
|
|
357
359
|
|
|
358
360
|
previous_statement_text = previous_statement
|
|
359
361
|
|
|
360
|
-
if isinstance(previous_statement,
|
|
362
|
+
if not isinstance(previous_statement, (str, type(None), )):
|
|
361
363
|
statement.in_response_to = previous_statement.text
|
|
362
|
-
previous_statement_text = previous_statement.text
|
|
363
|
-
|
|
364
|
-
# Set search_in_response_to from the previous statement's search_text
|
|
365
|
-
if previous_statement.search_text:
|
|
366
|
-
statement.search_in_response_to = previous_statement.search_text
|
|
367
|
-
elif previous_statement.text:
|
|
368
|
-
statement.search_in_response_to = self.tagger.get_text_index_string(
|
|
369
|
-
previous_statement.text
|
|
370
|
-
)
|
|
371
364
|
elif isinstance(previous_statement, str):
|
|
372
365
|
statement.in_response_to = previous_statement
|
|
373
|
-
statement.search_in_response_to = self.tagger.get_text_index_string(
|
|
374
|
-
previous_statement
|
|
375
|
-
)
|
|
376
366
|
|
|
377
367
|
self.logger.info('Adding "{}" as a response to "{}"'.format(
|
|
378
368
|
statement.text,
|
|
@@ -382,12 +372,6 @@ class ChatBot(object):
|
|
|
382
372
|
if not statement.persona:
|
|
383
373
|
statement.persona = 'bot:' + self.name
|
|
384
374
|
|
|
385
|
-
# Ensure search_text is set for the statement being saved
|
|
386
|
-
if not statement.search_text and statement.text:
|
|
387
|
-
statement.search_text = self.tagger.get_text_index_string(
|
|
388
|
-
statement.text
|
|
389
|
-
)
|
|
390
|
-
|
|
391
375
|
# Save the response statement
|
|
392
376
|
return self.storage.create(**statement.serialize())
|
|
393
377
|
|
|
@@ -618,13 +618,18 @@ class UbuntuCorpusTrainer(CsvFileTrainer):
|
|
|
618
618
|
if not self.disable_progress:
|
|
619
619
|
print('Extracting {}'.format(file_path))
|
|
620
620
|
|
|
621
|
+
if os.path.islink(self.data_path):
|
|
622
|
+
raise self.TrainerInitializationException(
|
|
623
|
+
'Refusing to extract archive to a symbolic link: {}'.format(self.data_path)
|
|
624
|
+
)
|
|
625
|
+
|
|
621
626
|
if not os.path.exists(self.data_path):
|
|
622
627
|
os.makedirs(self.data_path)
|
|
623
628
|
|
|
624
629
|
def is_within_directory(directory, target):
|
|
625
630
|
|
|
626
|
-
abs_directory = os.path.
|
|
627
|
-
abs_target = os.path.
|
|
631
|
+
abs_directory = os.path.realpath(directory)
|
|
632
|
+
abs_target = os.path.realpath(target)
|
|
628
633
|
|
|
629
634
|
prefix = os.path.commonprefix([abs_directory, abs_target])
|
|
630
635
|
|
|
@@ -633,6 +638,8 @@ class UbuntuCorpusTrainer(CsvFileTrainer):
|
|
|
633
638
|
def safe_extract(tar, path='.', members=None, *, numeric_owner=False):
|
|
634
639
|
|
|
635
640
|
for member in tar.getmembers():
|
|
641
|
+
if member.issym() or member.islnk():
|
|
642
|
+
raise Exception('Symlinks and hard links are not permitted in the tar file')
|
|
636
643
|
member_path = os.path.join(path, member.name)
|
|
637
644
|
if not is_within_directory(path, member_path):
|
|
638
645
|
raise Exception('Attempted Path Traversal in Tar File')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0001_initial.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/0009_tags.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{chatterbot-1.2.13 → chatterbot-1.2.14}/chatterbot/ext/django_chatterbot/migrations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|