title | emoji | colorFrom | colorTo | sdk | sdk_version | app_file | pinned |
---|---|---|---|---|---|---|---|
What would mother say? |
🫶 |
pink |
yellow |
streamlit |
1.21.0 |
app.py |
false |
This app includes a Haystack agent with access to 2 tools:
MastodonRetriever
: Useful for when you need to retrive the latest posts from a username to get an understanding of their styleWebSearch
: Useful for when you need to research the latest about a new topic
We build an Agent that aims to first understand the style in which a username posts. Then, it uses the WebSearch tool to gain knowledge on a topic that the LLM may not have info on, to generate a post in the users style about that topic.
Try it out on 🤗 Spaces
Custom Haystack Node
This repo contains a streamlit application that given a query about what a certain twitter username would post on a given topic, generates a post in their style (or tries to). It does so by using a custom Haystack node I've built called the MastodonFetcher
Custom PromptTemplates
It's been built with Haystack using the Agent
and by creating a custom PromptTemplate
All the prompt templates used in this demo, both for the WebQAPipeline
and the Agent
can be found in ./prompts
.
Check out our tutorial on the Conversational Agent here
- Install requirements:
pip install -r requirements.txt
- Run the streamlit app:
streamlit run app.py
- Createa a
.env
and add your Twitter Bearer token, OpenAI Key, and SerperDev Key:
TWITTER_BEARER_TOKEN
SERPER_KEY
OPENAI_API_KEY
This will start up the app on localhost:8501
where you will find a simple search bar