Coder Social home page Coder Social logo

ibl-ai-chatgpt-langchain's Introduction

ChatGPT LangChain LLM

Creates a ChatGPT LangChain LLM model via PyChatGPT.

Installation

  • First, install the ibl-ai-chatgpt-langchain package using pip by running this command:
pip install git+https://github.com/ibleducation/ibl-ai-chatgpt-langchain.git
  • Create a .env in the root directory of your project (e.g. if you use Django, the .env file should exist in the same directory as manage.py). In the .env file, put in your credentials, like below:
[email protected]
OPENAI_PASSWORD=XXXX
  • (Optional) If you don't want to create a .env file or do not know where it should be placed, you can also export the credentials in your shell (like bash, zsh, etc). Just run the commands below:
export [email protected]
export OPENAI_PASSWORD=XXXX
  • Aaand now we are good to go!

Usage

Here is an example asking ChatGPT what she thinks about the value of AI in education:

from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
from ibl_ai_chatgpt_langchain.base import IBLChatGPT

# make an LLM
llm = IBLChatGPT()

# setup a prompt
prompt = PromptTemplate(
    input_variables=["tool"],
    template="What's the value of {tool} in education?",
)

# make a chain
chain = LLMChain(llm=llm, prompt=prompt)

# ask ChatGPT what she thinks about AI in education.
chain.run("AI")

And here is the example output:

The use of AI in education can potentially offer many benefits. For example, AI-powered tutoring
systems can provide personalized instruction to each student, helping them to learn at their own
pace and address any gaps in their knowledge. AI can also be used to automate grading and administrative
tasks, freeing up teachers to focus on other aspects of their job. Additionally, AI can be used to
analyze large amounts of educational data and provide insights that can help educators improve their
teaching methods and better meet the needs of their students. Overall, the use of AI in education has the
potential to enhance the learning experience and improve outcomes for students.

ibl-ai-chatgpt-langchain's People

Contributors

mamigot avatar omorilewa avatar

Stargazers

Keyth M Citizen  avatar JayRam Nai avatar Yeshua WB III avatar Teddy Xinyuan Chen avatar Miraclewang avatar Jason Chester avatar rajpal avatar SERGIO RICARDO RAMOS avatar Shogo Okamoto avatar David Brady avatar John avatar Zinnia avatar Steven Syp avatar Erik Nomitch avatar Christopher David avatar Perry Raskin avatar  avatar  avatar

Watchers

 avatar  avatar Juan Carlos Espinoza Zurita avatar Alain charroux avatar David CB (nunpa) avatar Bhargav Soni avatar Jonathan Omarwoth avatar Ngabidong Brian avatar

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.