Skip to main content

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.

Metadata

Release files for weather-chatbot-phi3 0.1.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weather-chatbot-phi3 0.1.23
File Size Uploaded
weather_chatbot_phi3-0.1.23.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for weather-chatbot-phi3 0.1.23
File Interpreter ABI Platform
weather_chatbot_phi3-0.1.23-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / weather_chatbot_phi3-0.1.23.tar.gz

Download URL weather_chatbot_phi3-0.1.23.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e799ee8db0c0ed9822b4a16e83deead9442c80f0b0133f24044eb6cc35e0ac42
BLAKE2b-256 checksum
How to use checksums
d03c741fbddf45ac937abd31c71356d56fb7b135aa6391d4db737c06bbc16c6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Linux/6.8.0-35-generic

Release files / weather_chatbot_phi3-0.1.23-py3-none-any.whl

Download URL weather_chatbot_phi3-0.1.23-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b3aa8a1700d1ff21d07e559f8d79b4360ee16dc0fa6246104f226ccc328559a
BLAKE2b-256 checksum
How to use checksums
1ac04d8adaf414ed42e66fc422a9ef6829359e4bee8fda41c9d94c7a4eac89f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Linux/6.8.0-35-generic

Release history Release notifications | RSS feed

This release

0.1.23 This release

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page