neuralintents


Nameneuralintents JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummarySimple interface for working with intents and chatbots.
upload_time2023-08-28 11:25:29
maintainer
docs_urlNone
authorNeuralNine (Florian Dedov)
requires_python
license
keywords python neural machine learning chatbots chat artificial intelligence virtual assistant
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# neuralintents

Still in a buggy alpha state.

## Setting Up A Basic Assistant

```python
from neuralintents.assistants import BasicAssistant

assistant = BasicAssistant('intents.json')

assistant.fit_model(epochs=50)
assistant.save_model()

done = False

while not done:
    message = input("Enter a message: ")
    if message == "STOP":
        done = True
    else:
        print(assistant.process_input(message))
```

## Binding Functions To Requests

```python
from neuralintents.assistants import BasicAssistant


stocks = ['AAPL', 'META', 'TSLA', 'NVDA']


def print_stocks():
    print(f'Stocks: {stocks}')


assistant = BasicAssistant('intents.json', method_mappings={
    "stocks": print_stocks,
    "goodbye": lambda: exit(0)
})

assistant.fit_model(epochs=50)
assistant.save_model()

done = False

while not done:
    message = input("Enter a message: ")
    if message == "STOP":
        done = True
    else:
        print(assistant.process_input(message))
```

## Sample intents.json File
```json
{"intents": [
  {"tag": "greeting",
    "patterns": ["Hi", "How are you", "Is anyone there?", "Hello", "Good day", "Whats up", "Hey", "greetings"],
    "responses": ["Hello!", "Good to see you again!", "Hi there, how can I help?"],
    "context_set": ""
  },
  {"tag": "goodbye",
    "patterns": ["cya", "See you later", "Goodbye", "I am Leaving", "Have a Good day", "bye", "cao", "see ya"],
    "responses": ["Sad to see you go :(", "Talk to you later", "Goodbye!"],
    "context_set": ""
  },
  {"tag": "programming",
    "patterns": ["What is progamming?", "What is coding?", "Tell me about programming", "Tell me about coding", "What is software development?"],
    "responses": ["Programming, coding or software development, means writing computer code to automate tasks."],
    "context_set": ""
  },
  {"tag": "resource",
    "patterns": ["Where can I learn to code?", "Best way to learn to code", "How can I learn programming", "Good programming resources", "Can you recommend good coding resources?"],
    "responses": ["Check out the NeuralNine YouTube channel and The Python Bible series (7 in 1)."],
    "context_set": ""
  },
  {"tag": "stocks",
    "patterns": ["What are my stocks?", "Which stocks do I own?", "Show my stock portfolio"],
    "responses": ["Here are your stocks!"],
    "context_set": ""
  }
]
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "neuralintents",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python,neural,machine learning,chatbots,chat,artificial intelligence,virtual assistant",
    "author": "NeuralNine (Florian Dedov)",
    "author_email": "<mail@neuralnine.com>",
    "download_url": "https://files.pythonhosted.org/packages/3d/04/6ef3ce1f1b1739352a3037d1ab0a2d117ceaba5f9c424ee17e1dd95f78c9/neuralintents-0.1.0.tar.gz",
    "platform": null,
    "description": "\n# neuralintents\n\nStill in a buggy alpha state.\n\n## Setting Up A Basic Assistant\n\n```python\nfrom neuralintents.assistants import BasicAssistant\n\nassistant = BasicAssistant('intents.json')\n\nassistant.fit_model(epochs=50)\nassistant.save_model()\n\ndone = False\n\nwhile not done:\n    message = input(\"Enter a message: \")\n    if message == \"STOP\":\n        done = True\n    else:\n        print(assistant.process_input(message))\n```\n\n## Binding Functions To Requests\n\n```python\nfrom neuralintents.assistants import BasicAssistant\n\n\nstocks = ['AAPL', 'META', 'TSLA', 'NVDA']\n\n\ndef print_stocks():\n    print(f'Stocks: {stocks}')\n\n\nassistant = BasicAssistant('intents.json', method_mappings={\n    \"stocks\": print_stocks,\n    \"goodbye\": lambda: exit(0)\n})\n\nassistant.fit_model(epochs=50)\nassistant.save_model()\n\ndone = False\n\nwhile not done:\n    message = input(\"Enter a message: \")\n    if message == \"STOP\":\n        done = True\n    else:\n        print(assistant.process_input(message))\n```\n\n## Sample intents.json File\n```json\n{\"intents\": [\n  {\"tag\": \"greeting\",\n    \"patterns\": [\"Hi\", \"How are you\", \"Is anyone there?\", \"Hello\", \"Good day\", \"Whats up\", \"Hey\", \"greetings\"],\n    \"responses\": [\"Hello!\", \"Good to see you again!\", \"Hi there, how can I help?\"],\n    \"context_set\": \"\"\n  },\n  {\"tag\": \"goodbye\",\n    \"patterns\": [\"cya\", \"See you later\", \"Goodbye\", \"I am Leaving\", \"Have a Good day\", \"bye\", \"cao\", \"see ya\"],\n    \"responses\": [\"Sad to see you go :(\", \"Talk to you later\", \"Goodbye!\"],\n    \"context_set\": \"\"\n  },\n  {\"tag\": \"programming\",\n    \"patterns\": [\"What is progamming?\", \"What is coding?\", \"Tell me about programming\", \"Tell me about coding\", \"What is software development?\"],\n    \"responses\": [\"Programming, coding or software development, means writing computer code to automate tasks.\"],\n    \"context_set\": \"\"\n  },\n  {\"tag\": \"resource\",\n    \"patterns\": [\"Where can I learn to code?\", \"Best way to learn to code\", \"How can I learn programming\", \"Good programming resources\", \"Can you recommend good coding resources?\"],\n    \"responses\": [\"Check out the NeuralNine YouTube channel and The Python Bible series (7 in 1).\"],\n    \"context_set\": \"\"\n  },\n  {\"tag\": \"stocks\",\n    \"patterns\": [\"What are my stocks?\", \"Which stocks do I own?\", \"Show my stock portfolio\"],\n    \"responses\": [\"Here are your stocks!\"],\n    \"context_set\": \"\"\n  }\n]\n}\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Simple interface for working with intents and chatbots.",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "python",
        "neural",
        "machine learning",
        "chatbots",
        "chat",
        "artificial intelligence",
        "virtual assistant"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9492e5f303aa77592f493ab15d8e4b6ad57e1005a9d2a846d3473f3dbf891dd3",
                "md5": "0833c53c44d8c19d2891d096f544f0a4",
                "sha256": "cc107349817ab267931142856006082ae18f67422cac789119c16a1d273ae005"
            },
            "downloads": -1,
            "filename": "neuralintents-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0833c53c44d8c19d2891d096f544f0a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6592,
            "upload_time": "2023-08-28T11:25:27",
            "upload_time_iso_8601": "2023-08-28T11:25:27.727459Z",
            "url": "https://files.pythonhosted.org/packages/94/92/e5f303aa77592f493ab15d8e4b6ad57e1005a9d2a846d3473f3dbf891dd3/neuralintents-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d046ef3ce1f1b1739352a3037d1ab0a2d117ceaba5f9c424ee17e1dd95f78c9",
                "md5": "fcefcb4bfd785831d4d3ed8bdaa21417",
                "sha256": "06c1f3b332af3c06c012174d0575bd84f1ce9f6bea92f875ca717905a5dc9129"
            },
            "downloads": -1,
            "filename": "neuralintents-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fcefcb4bfd785831d4d3ed8bdaa21417",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5885,
            "upload_time": "2023-08-28T11:25:29",
            "upload_time_iso_8601": "2023-08-28T11:25:29.057853Z",
            "url": "https://files.pythonhosted.org/packages/3d/04/6ef3ce1f1b1739352a3037d1ab0a2d117ceaba5f9c424ee17e1dd95f78c9/neuralintents-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-28 11:25:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "neuralintents"
}
        
Elapsed time: 1.72737s