How campusx-official/langchain-prompts works
This repository is a set of small, standalone LangChain examples rather than one integrated application. It demonstrates direct chat, message-history handling, prompt construction, and a Streamlit research-paper summarizer. The scripts independently invoke a chat model or render prompts; the research UI loads a prompt template that can be produced by the generator. Relationships shown below come from the excerpts; the empty README provides no additional architecture details.
Main entry points: prompt_ui.py Research summary UI · message_placeholder.py History prompt · prompt_template.py Text prompt example · chatbot.py Interactive chatbot
Components 11
Chat examples
- Interactive chatbot
chatbot.py - Message exchange
messages.py - History prompt
message_placeholder.py - Chat history
chat_history.txt
Prompt examples
- Chat prompt example
chat_prompt_template.py - Text prompt example
prompt_template.py - Prompt generator
prompt_generator.py - Saved prompt template
template.json
Research summarizer
- Research summary UI
prompt_ui.py
Other components
- User
- OpenAI chat model
Connections 14
- User → Interactive chatbot: enters messages
chatbot.py - Interactive chatbot → OpenAI chat model: invokes
chatbot.py - User → Message exchange: provides question
messages.py - Message exchange → OpenAI chat model: invokes
messages.py - History prompt → Chat history: reads
message_placeholder.py - History prompt → User: prints rendered prompt
message_placeholder.py - Chat prompt example → User: prints rendered prompt
chat_prompt_template.py - Text prompt example → OpenAI chat model: invokes
prompt_template.py - Text prompt example → User: prints response
prompt_template.py - Prompt generator → Saved prompt template: saves
prompt_generator.py - User → Research summary UI: selects options
prompt_ui.py - Research summary UI → Saved prompt template: loads
prompt_ui.py - Research summary UI → OpenAI chat model: invokes
prompt_ui.py - Research summary UI → User: displays summary
prompt_ui.py