Skip to content

natrixdev/simple-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Simple AI using Python

This is a simple IA written in Python that can answer basic questions about the weather and USB connections. The AI is capable of responding to the following types of questions:

  • "What's the weather like today?"
  • "Will it rain later?"
  • "How do I connect a USB to my computer?"
  • "My computer isn't recognizing the USB, what do I do?"

How it works

The AI is designed to respond to user input based on the presence of certain keywords. If the user input contains the word "weather", the IA will respond with a random weather-related response from a predefined list. If the user input contains the word "usb", the AI will respond with a random USB-related response from another predefined list. If the user input does not contain any of these keywords, the AI will respond with a random greeting from yet another predefined list.

How to use

To use the AI, simply instantiate the SimpleIA class and call the respond method with a string representing the user's question. The respond method will return a string containing the IA's response. Here's an example:

from ia import SimpleIA

ia = SimpleIA()
response = ia.respond("What's the weather like today?")
print(response) # "Expect some rain later"

Support:

Star Fork
Star Fork

About

A simple AI using python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages