GitXplorerGitXplorer
a

aprs-assistant

public
1 stars
1 forks
5 issues

Commits

List of commits on branch main.
Verified
846c5a395de7e8ad998857c4b39fe5c8490da94c

Adds the ability to query a local repeater database. (#20)

aafourney committed 3 months ago
Verified
f3f7a6fe31f83c0463aff7ee27fac682343f29ba

Uses the position, or callsign to determine the Bing search market. (#18)

aafourney committed 4 months ago
Verified
2630a4133fa600aa9c9c4f98429b86cd611c1aab

Added the ability to pass markets (e.g. 'en-US'), or two-letter country codes (e.g., 'US') to the Bing API. (#17)

aafourney committed 4 months ago
Verified
c1fc4aae8d7abfd1c531ff5ee1208c75d14f4b1c

Added two-letter ISO 3166 country codes to _itu_prefixes. (#16)

aafourney committed 4 months ago
Verified
2b2c2be56924d9005cc980b4726254f68de419da

Added location header to Bing search. (#14)

aafourney committed 4 months ago
Unverified
1a6e0c0832b718a4bd74975661c929b8439723b4

Merge branch 'main' of github.com:afourney/aprs-assistant

aafourney committed 4 months ago

README

The README file for this repository.

APRS Assistant

PyPI - Version PyPI - Python Version

An LLM-based assistant for the Automatic Packet Reporting System (APRS).

[!IMPORTANT] This library provides core functionality for an LLM-based APRS chatbot, but does not itself directly handle APRS messaging (RX, or TX). If you want to run APRS Assistant yourself, on the APRS IS network, you should visit the sister project aprs-assistant-plugin, which has everything you need.

For local development, or to integrate APRS Assistant into other frameworks, read on. For running APRS Assistant, heed the above advice and go to aprs-assistant-plugin now.


Installation

pip install aprs-assistant

Callsign

Your bot needs a callsign! Set with the APRS_ASSISTANT_CALLSIGN environment variable.

export APRS_ASSISTANT_CALLSIGN=<CLEVER_CALLSIGN>

API Keys

At a minimum, this library requires setting an OpenAI API key. Bing and APRS.fi API keys are also used to support various tools and services. Set the, as environment variable in bash, as follows:

export OPENAI_API_KEY=<YOUR_KEY>
export BING_API_KEY=<YOUR_KEY>
export APRSFI_API_KEY=<YOUR_KEY>

Running Local Chat

The library supports local chats (e.g., for debugging) as follows:

python -m aprs_assistant <YOUR_CALLSIGN>

Type exit or press Ctrl-D to exit.

FCC ULS Integration

APRS Assistant supports basic callsign lookups using a local copy of the FCC ULS database. This database is about 325 MB and is easily created.

cd ./tools/parse_fcc_uls
bash create_db.bash
cd ../..
mkdir data
mv ./tools/parse_fcc_uls/fcc_uls.db data/.

This step only needs to be done once (or when you wish to update the database with new records!)

See ./tools/parse_fcc_uls/README for more details.

Integration

To integrate aprs-assistant into your application, simply use:

from aprs_assistant import generate_reply

sender_callsign = "NOCALL"
message = "What's the weather?"
response = generate_reply(sender_callsign, message)

print(response)

Note: response can be None

Data Sources

License

aprs-assistant is distributed under the terms of the MIT license.