Skip to main content

neuralintents

Still in a buggy alpha state.

Setting Up A Basic Assistant

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

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

{"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": ""
  }
]
}

Release files for neuralintents 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neuralintents 0.1.0
File Size Uploaded
neuralintents-0.1.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for neuralintents 0.1.0
File Interpreter ABI Platform
neuralintents-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / neuralintents-0.1.0.tar.gz

Download URL neuralintents-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
06c1f3b332af3c06c012174d0575bd84f1ce9f6bea92f875ca717905a5dc9129
BLAKE2b-256 checksum
How to use checksums
3d046ef3ce1f1b1739352a3037d1ab0a2d117ceaba5f9c424ee17e1dd95f78c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / neuralintents-0.1.0-py3-none-any.whl

Download URL neuralintents-0.1.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc107349817ab267931142856006082ae18f67422cac789119c16a1d273ae005
BLAKE2b-256 checksum
How to use checksums
9492e5f303aa77592f493ab15d8e4b6ad57e1005a9d2a846d3473f3dbf891dd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page