GithubHelp home page GithubHelp logo

uezo / minette-python Goto Github PK

View Code? Open in Web Editor NEW
28.0 8.0 0.0 580 KB

Minette is a minimal and extensible chatbot framework.

License: Other

Python 100.00%
bot bot-framework line python clova chatbot mecab janome

minette-python's People

Contributors

uezo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minette-python's Issues

Support SQLAlchemy

Pass Session object of SQLAlchemy to DialogService instead of database connection.

Cross-channel user management

channel: LINE / uid: A => minette_uid: user01
channel: FB / uid: B => minette_uid: user02
channel: FB / uid: C => minette_uid: user03

If LINE/A and FB/C is the same user and to treat as the same user in the botapp, then I have to change user_id_mapper table directly.
I want to customize the mapping rule easily without SQL.

Simplify the structure of packages and modules

Session and SessionStore: minette.session.session_store => minette.session
User and UserRepository: minette.user.user_repository => minette.user
Classifier: minette.dialog.classifier => minette.dialog
DialogService: minette.dialog.dialog_service => minette.dialog
Message and MessageLogger: minette.dialog.message => minette.dialog

DB file names in config file

When I want to change .db file names from minette.db to other, we should create instances of SessionStore, UserRepository and MessageLogger with connection_str and then call automata.create() by passing them.
I want to change them call automata.create() by passing just class names as arguments.

Make it easier to download payload

Payload should have some methods like get() and save(path).
They simply download from the URL with headers that is set to payload object.

The type of Session.data and User.data should be dict

プロジェクト内でKey-Valueで/イテレーションでアクセスできる場合とそうでない場合の両方を考慮して都度判定してから処理を行う・・・というのがいまいち。最初からdictに統一した方が楽。

JSON serialization

JSON serialization should be supported to be saved in RDBMS and for interoperability.

  • User
  • Session
  • Message
  • WordNode

pytzが存在しないとインストールに失敗する

setup.py で __version__ を得るために minette ライブラリからimportしていますが、そこでpytzを参照しているからと予想されます。install_requireが効く前です。環境はPython 3.6.2 on Mac (pyenv使用)

$ pip install minette
Collecting minette
  Downloading minette-0.1.dev23.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/cr/b5nntcfd27j5sh_s9fpsdmgh0000gn/T/pip-build-ra9r6anl/minette/setup.py", line 2, in <module>
        from minette import __version__
      File "/private/var/folders/cr/b5nntcfd27j5sh_s9fpsdmgh0000gn/T/pip-build-ra9r6anl/minette/minette/__init__.py", line 2, in <module>
        from minette.automata import Automata, create, get_default_logger
      File "/private/var/folders/cr/b5nntcfd27j5sh_s9fpsdmgh0000gn/T/pip-build-ra9r6anl/minette/minette/automata.py", line 5, in <module>
        from pytz import timezone
    ModuleNotFoundError: No module named 'pytz'

Switching databases easily

bot = automata.create(
    connection_provider=MySQLConnectionProvider,
    session_store=MySQLSessionStore,
    user_repository=MySQLUserRepository,
    message_logger=MySQLMessageLogger
)

to

bot = automata.create(
    database="mysql"
)

or switch by config file.

[minette]
database = mysql

User Store not saving from passed in User model

Hello,

I am passing in a User model in my adapter for profile_image_url, name and nickname however it appears the userstore.py needs to make change to allow the user object to be passed into get() method
user = user or User(channel=channel, channel_user_id=channel_user_id)
and additionally change to _get_user() in core.py to accept the passed in user model.

Would you agree? If so I can create a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.