LLM plugin for answering questions about Twitter profiles
Project description
llm-twitter
LLM plugin for answering questions about Twitter profiles
Installation
Install this plugin in the same environment as LLM:
llm install llm-twitter
Configuration
Set your Twitter API bearer token as an environment variable:
export TWITTER_BEARER_TOKEN="your_twitter_bearer_token_here"
You can obtain a bearer token by applying for a Twitter Developer account and creating an application at https://developer.twitter.com/
Usage
To use the llm-twitter plugin, run the following command:
llm twitter "Your question about the Twitter profile" --account @username
Options:
--accountor-a: Twitter account (username or @username) - required--no-stream: Do not stream output--force-refreshor-f: Force refresh of the cached profile--modelor-m: Specify a different LLM model to use for the response
Examples:
llm twitter "What is the user's follower count?" --account @openai
llm twitter "Summarize the user's bio" --account @elonmusk --no-stream
llm twitter "What are the main topics this user tweets about?" --account @ylecun --force-refresh
llm twitter "Analyze the user's Twitter presence" --account @google --model gpt-4
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-twitter
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Contributing
Contributions to llm-twitter are welcome! Please refer to the GitHub repository for more information on how to contribute.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_twitter-0.1.tar.gz.
File metadata
- Download URL: llm_twitter-0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c058853cb2c83a8470dff997788d99ad0854575be7fe3fbb8367e7580809a81
|
|
| MD5 |
6a31d7e8ebe3f5d99ef1c92b470e4711
|
|
| BLAKE2b-256 |
046a92593d6bfea14129d3661044eacb10fe87f04ba8d5823c2971dc416b1ced
|
File details
Details for the file llm_twitter-0.1-py3-none-any.whl.
File metadata
- Download URL: llm_twitter-0.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
121c8eedaa7d48d5f573baacfc4e6129adf8c70b61e6b56aa1f48556f97930fb
|
|
| MD5 |
cdb8e85b648427038dc61455a5dedfb3
|
|
| BLAKE2b-256 |
772ae346bbf9965e221e55aa4d3f73065fbc46889510132ac1017d9534e07d42
|