An LLM Chatbot integrated with Open Weather API for Real-Time Weather Information.
Project description
Weather Chatbot
An LLM Chatbot integrated with Open Weather API for Real-Time Weather Information.
Features
- Get current weather information for any city.
- Get a 2-day weather forecast for any city.
- Utilizes
LangChain
for agent-based interactions. - Runs on CPU using
llama-cpp-python
. - Supports a context length of 4k tokens with the
phi-3-mini-4k-instruct-gguf
model.
Installation
You can install the package using pip:
pip install weather-chatbot-phi3
Run in UNIX terminal
weather-chatbot-phi3
Run in python notebook
from weather_chatbot import app
app.main()
##Try it out on Google Colab
You can try out the Weather Chatbot on Google Colab by clicking here.
Under the Hood
This project leverages the power of LangChain
for orchestrating the LLM interactions. Here's a breakdown of the key components:
LangChain Agents and Tools
- Agents: LangChain's agent framework is used to create an intelligent assistant capable of performing specific tasks based on natural language inputs.
- Tools: Two main tools are integrated into the agent:
WeatherLookup
: Fetches current weather data.ForecastLookup
: Retrieves weather forecast for the next two days.
LLM with llama-cpp-python
The language model used is the phi-3-mini-4k-instruct-gguf
, which supports a context length of 128k tokens. This model is run on the CPU using llama-cpp-python
, ensuring that it can operate efficiently without the need for GPU resources.
License
This project is licensed under the CC BY-NC-SA 4.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file weather_chatbot_phi3-0.1.23.tar.gz
.
File metadata
- Download URL: weather_chatbot_phi3-0.1.23.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.7 Linux/6.8.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e799ee8db0c0ed9822b4a16e83deead9442c80f0b0133f24044eb6cc35e0ac42 |
|
MD5 | 8f08e37c05b6c7da4195dbbaf312cf26 |
|
BLAKE2b-256 | d03c741fbddf45ac937abd31c71356d56fb7b135aa6391d4db737c06bbc16c6e |
File details
Details for the file weather_chatbot_phi3-0.1.23-py3-none-any.whl
.
File metadata
- Download URL: weather_chatbot_phi3-0.1.23-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.7 Linux/6.8.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b3aa8a1700d1ff21d07e559f8d79b4360ee16dc0fa6246104f226ccc328559a |
|
MD5 | bf6c59bfc081d3e424a18e185519fb79 |
|
BLAKE2b-256 | 1ac04d8adaf414ed42e66fc422a9ef6829359e4bee8fda41c9d94c7a4eac89f9 |