Send prompts to Claude (via Anthropic) or ChatGPT (via OpenAI) from within your analysis workflows using LangChain under the hood.
Functions
SendPromptToAnthropic
Send a prompt to Claude and return the response. Requires an ANTHROPIC_API_KEY environment variable.
from analysistoolbox.llm import SendPromptToAnthropic
response = SendPromptToAnthropic(
prompt="Summarize the key findings from this data: ...",
model="claude-opus-4-8"
)
SendPromptToChatGPT
Send a prompt to ChatGPT. Requires an OPENAI_API_KEY environment variable.
from analysistoolbox.llm import SendPromptToChatGPT
response = SendPromptToChatGPT(
prompt="What does this trend suggest about customer behavior?",
model="gpt-4o"
)
Use cases
- Automated narrative generation from analysis results
- Document summarization pipelines
- Hypothesis generation from data patterns
- AI-assisted intelligence reporting