Code Monkey home page Code Monkey logo

jarvis's Introduction

JARVIS

JARVIS (Just A Rather Very Intelligent System) is a simple AI assistant that uses OpenAI's GPT-3 language model to answer user questions and carry out tasks.

Installation

To run JARVIS, you will need to have .NET installed on your machine. Once you have .NET installed, you can download or clone this repository and open it in Visual Studio.

You will also need to obtain an OpenAI API key in order to use JARVIS. Once you have an API key, you can add it to the config.json file.

Getting started

To use JARVIS, you will need an OpenAI API key. Once you have your API key, add it to the config.json file in the following format:

{
  "OpenAI": {
    "ApiKey": "YOUR_API_KEY_HERE"
  }
}

Usage

To start JARVIS, simply run the BeginBot method in the Program.cs file. This will initialize the OpenAI class and begin the chat loop.

During the chat loop, JARVIS will prompt the user for input, then use OpenAI to generate a response. The response will be displayed to the user and read aloud using the SpeechSynthesizer class.

To exit the chat loop, simply type "exit" and hit enter.

Once JARVIS is running, you can type any question or command into the console and JARVIS will respond with the best answer or carry out the requested task. For example:

Hello! My name is JARVIS. How can I help you?
> What's the weather like today?
JARVIS: The weather is sunny and mild today.
> Calculate the third degree of a triangle if the first 2 degrees are 20 and 43
JARVIS: 83.6 degrees
> Exit

Classes

The JARVIS chatbot is made up of several C# classes, each of which handles a specific part of the chatbot's functionality.

OpenAI

The OpenAI class is responsible for interfacing with the OpenAI API and generating responses to user input. It takes in several parameters, including the user's input, the OpenAI engine to use, and various settings for the OpenAI API.

HttpHandler

The HttpHandler class is responsible for handling HTTP requests and responses. It takes in an OpenAI API key and uses it to authenticate requests to the OpenAI API.

History

The History class is responsible for maintaining a history of previous user inputs. It takes in a maximum history length and stores a list of previous prompts. When a new prompt is added, the history is truncated to the maximum length.

Config

The Config class is responsible for loading configuration settings from a JSON file. It takes in a file path and returns an object containing the configuration settings.

Credits

JARVIS was created with a lot of help from ChatGPT

I guess you could say JARVIS helped build JARVIS

License

This code is released under the MIT License. See LICENSE file for more details.

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.