simplex-chat/apps/simplex-bot
spaced4ndy e05a35e26e
core: support postgres backend (#5403)
* postgres: modules structure (#5401)

* postgres: schema, field conversions (#5430)

* postgres: rework chat list pagination query (#5441)

* prepare cabal for merge

* restore cabal changes

* simplexmq

* postgres: implementation wip (tests don't pass) (#5481)

* restore ios file

* postgres: implementation - tests pass (#5487)

* refactor DB options

* refactor

* line

* style

* style

* refactor

* $

* update simplexmq

* constraintError

* handleDBErrors

* fix

* remove param

* Ok

* case

* case

* case

* comment

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2025-01-10 11:27:29 +00:00
..
Main.hs core: support postgres backend (#5403) 2025-01-10 11:27:29 +00:00
README.md apps: update chat bots, readme (#1928) 2023-02-14 07:57:27 +00:00

Simple SimpleX Chat bot example

This chat bot is a Haskell implementation of a REPL chat bot.

All you have to do to create your bot based on this example is to provide a welcome message for connecting users and a function of type Contact -> String -> IO String. This function should transform the sent message into a reply message, ignoring any system messages related to preferences and user profile changes.

This bot example calculates the square of the number that is sent to it, but you can program it to do other things, simply by changing REPL function:

  • a more advanced calculator (e.g., based on this one).
  • translation to/from any language.
  • lookup of market quotes.
  • search of the information.
  • AI-powered dialogue the bot can maintain any conversation state based on the contact.
  • provide any other online service via chat UI.
  • etc.

Please share any bots you create with us, we will add to this page and can host them if you like!