Skip to content

celinehuannng/infobot-local-AI-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

InfoBot

Creator: Celine Huang

Course: INF1324 Critical Infrastructures

Course Instructor: Professor Siobhan Stevenson

Table of Contents

About InfoBot

InfoBot is an AI chatbot made using Langchain, Ollama, and the Llama 3.2 model. The chatbot was created and designed to reflect my definition of information infrastructure within generative AI, inspired by the paper "A Layered Organizing Logic for Generative AI Evolution. Insights from digital infrastructure theory” by Jonny Holmstrom, a Swedish Professor of Information Systems.

How to Run the Program

For Google Colab:

  1. Upload the python file
  2. Change runtime type to T4 GPU
  3. Run the program and input when prompted to

For Visual Studio Code:

  1. Install Ollama for your desktop by following the instructions here: https://github.com/ollama/ollama
  2. Install the required python packages in your terminal using the following command: pip install langchain langchain-ollama ollama
  3. All the code before the section with the actual chatbot should be replaced with these lines:
  • from langchain_ollama import Ollama
  • from langchain_core.prompts import ChatPromptTemplate

Sample Input and Output

Input

You: Can you tell me about the social factors associated with generative AI?

You: I am looking for some book recommendations. I am interested in Chinese, Japanese, and Korean literature. Can you provide some recommendations?

You: goodbye

Output

Infobot: Of course! Since I am built on generative AI, I can definitely answer this question for you! The information infrastructure of Generative AI is shaped by various social factors such as norms, values, and biases. These elements can impact the design of algorithms, data curation practices, and even the way that we interact with users. If you want to see an example of this, why don’t you ask me a related question?

InfoBot: What a fascinating combination of interests! Here are some classic and modern book recommendations from China, Japan, and Korea that might interest you:

Chinese Literature

  1. "Journey to the West" by Wu Cheng'en - a classic novel about the Monkey King's adventures in China
  2. "The Tale of Genji" by Murasaki Shikibu (written in classical Chinese) - considered one of the greatest works of Japanese literature

Japanese Literature

  1. "Kwaidan: Stories and Studies of Strange Things" by Lafcadio Hearn - a collection of ghost stories showcasing Japanese folklore
  2. "The Wind-Up Bird Chronicle" by Haruki Murakami - a surreal and dreamlike novel that blends elements of magic realism

Korean Literature

  1. "The Tale of Riminangwi" - an epic poem from the 13th century telling the story of King Sejong's creation of the Korean alphabet
  2. "Human Acts" by Han Kang - a powerful and moving novel about social activism in modern South Korea

Additionally, you may also want to explore the works of:

  • Mo Yan (Chinese author known for darkly comedic novels like "Red Sorghum")
  • Haruki Murakami (Japanese author)
  • Banana Yoshimoto (Japanese author)
  • Han Kang (Korean author)
  • Yi Munjal (Korean author)

References

Google. (n.d.). Run Ollama in Colab. Google colab. https://colab.research.google.com/github/5aharsh/collama/blob/main/Ollama_Setup.ipynb#scrollTo=Jh5CBAFxBYAC

GeeksforGeeks. (2024, June 3). Ollama explained: Transforming AI accessibility and Language Processing. https://www.geeksforgeeks.org/ollama-explained-transforming-ai-accessibility-and-language-processing/

Ollama. (n.d.). Ollama/Ollama: Get up and running with Llama 3.2, mistral, gemma 2, and other large language models. GitHub. https://github.com/ollama/ollama

Yoga, C. (n.d.). Local AI Chatbot in Python. YouTube. https://www.youtube.com/watch?v=gr9E6fN_fLk

About

A local AI chatbot made using Langchain, Ollama, and Meta's Llama 3.2 model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages