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
LangChainfor agent-based interactions. - Runs on CPU using
llama-cpp-python. - Supports a context length of 4k tokens with the
phi-3-mini-4k-instruct-ggufmodel.
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| weather_chatbot_phi3-0.1.23.tar.gz | 7.3 kB | Without provenance | Details for weather_chatbot_phi3-0.1.23.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| weather_chatbot_phi3-0.1.23-py3-none-any.whl | Python 3 | none | any | Details for weather_chatbot_phi3-0.1.23-py3-none-any.whl |
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
|
Security for weather-chatbot-phi3 0.1.23
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.