Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/curiousily/tweetcrafter
Write tweets with AI Agents (CrewAI) and LLMs (Llama 3, GPT-4o)
https://github.com/curiousily/tweetcrafter
ai-agents chatgpt crewai gpt-4o langchain llama tweeter
Last synced: 3 days ago
JSON representation
Write tweets with AI Agents (CrewAI) and LLMs (Llama 3, GPT-4o)
- Host: GitHub
- URL: https://github.com/curiousily/tweetcrafter
- Owner: curiousily
- License: mit
- Created: 2024-05-29T08:26:56.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-01T12:25:47.000Z (6 months ago)
- Last Synced: 2024-11-08T20:05:45.156Z (5 days ago)
- Topics: ai-agents, chatgpt, crewai, gpt-4o, langchain, llama, tweeter
- Language: Jupyter Notebook
- Homepage: https://www.mlexpert.io/bootcamp/ai-agents-in-action
- Size: 429 KB
- Stars: 20
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TweetCrafter
Write tweets with AI Agents (CrewAI)
## Installation
Clone the repo
```sh
git clone [email protected]:curiousily/tweetcrafter.git
cd tweetcrafter
``````sh
poetry install
```Install iPython kernel:
```sh
poetry run python -m ipykernel install --user --name tweetcrafter --display-name "Python (tweetcrafter)"
```## Add API keys
Create a `.env` file in the root of the project and add your Groq and/or OpenAI API keys:
```sh
GROQ_API_KEY=
OPENAI_API_KEY=
```## Usage
Go to `app.py` and change the inputs:
```py
inputs = {
"topic": "Summary of the key new features of Phi-3",
"urls": [
"https://huggingface.co/microsoft/Phi-3-vision-128k-instruct",
],
"suggestion": "Focus on the performance and how-to use the model.",
}
```Add tweets to analyze their writing style in `data/tweets.md`:
```md
# TweetEver wondered how to reproduce GPT-2 (124M) efficiently?
@karpathy with llm.c has the answer!- 90 mins, $20 on 8X A100 80GB SXM
- FineWeb dataset: 10B tokens
- MFU: 49-60%, 178K tokens/sechttps://github.com/karpathy/llm.c/discussions/481
```Run the app:
```sh
poetry run python app.py
``````py
{
"total_tokens":12334,
"prompt_tokens":10260,
"completion_tokens":2074,
"successful_requests":8
}
```## Result
The tweets I got from the crew (saved to `output/tweet.md`):
```md
Original Tweet:
"Meet Phi-3, the cutting-edge AI model revolutionizing NLP! 🚀💻
• Processes human language efficiently and accurately
• Ideal for NLP, text gen, conversational AI, sentiment analysis, and language translation
• Transparent, accountable, and fair decision-making
• Trained on diverse datasets and compatible with TensorFlow and PyTorch
#Phi3 #AI #NLP #LanguageModel #ResponsibleAIVersion 1:
"Unlock the power of Phi-3, the AI model that's changing the NLP game! 🚀💻
• Efficient and accurate language processing
• Perfect for text gen, conversational AI, sentiment analysis, and language translation
• Transparency, accountability, and fairness in decision-making
• Compatible with TensorFlow and PyTorch
#Phi3 #AI #NLP #LanguageModel #ResponsibleAIVersion 2:
"Take your NLP projects to the next level with Phi-3! 🚀💻
• Fast and accurate language processing
• Ideal for conversational AI, sentiment analysis, and language translation
• Built with transparency, accountability, and fairness in mind
• Compatible with TensorFlow and PyTorch
#Phi3 #AI #NLP #LanguageModel #ResponsibleAIVersion 3:
"Discover the future of NLP with Phi-3! 🚀💻
• Efficient language processing for text gen, conversational AI, and more
• Transparent, accountable, and fair decision-making
• Trained on diverse datasets and compatible with TensorFlow and PyTorch
• Revolutionize your NLP projects with Phi-3
#Phi3 #AI #NLP #LanguageModel #ResponsibleAI
```## Observability
_TweetCrafter_ stores logs of prompts and individual agent logs in the `logs` directory.
Have a look at the `notebooks/explore-logs.ipynb` notebook to explore the logs.