Financial Data Assistant - A PocketFlow-based LLM library for financial data chat with tool calling
Project description
LLMFA Agent
A PocketFlow-based Python library for financial data chat with tool calling using Gemini AI.
Installation
pip install llmfa-agent
Quick Start
import asyncio
from src import generate_response
async def main():
response = await generate_response([
{"role": "user", "content": "What's the current price of NVDA?"}
])
print(response.response) # The assistant's reply
print(response.tool_calls) # Tools called with results
print(response.sources) # Retrieved documents
asyncio.run(main())
Environment Variables
export GEMINI_API_KEY=your_gemini_api_key
export MONGO_CONNECTION_STRING=mongodb+srv://... # Optional
Features
- 🤖 Gemini 3 Flash - Powered by Google's latest AI model
- 🔧 Tool Calling - Automatic function execution for stock data
- 📊 Real-time Data - Live stock prices via yfinance
- 📚 RAG Support - Vector search for document retrieval
- 🌐 Multilingual - Thai and English language support
Available Tools
- get_minute_bars: Real-time 1-minute OHLCV data (via yfinance)
- get_market_data: Historical stock data from MongoDB
- vector_search: Semantic search for financial documents
License
MIT
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
llmfa_agent-0.1.0.tar.gz
(10.8 kB
view details)
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 llmfa_agent-0.1.0.tar.gz.
File metadata
- Download URL: llmfa_agent-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96fecf844148b0fa357a90b882f7140fb449f08c95d552b0b83dc037d0258903
|
|
| MD5 |
4b4cc5db3e9d10e2ea406227ec68459c
|
|
| BLAKE2b-256 |
67d23f8e9f82144aae0bb071673547f1fc37c289b3e9af4be0ca231682cf9785
|
File details
Details for the file llmfa_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llmfa_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f22ebf69df6ea3c95395103943b94969ed63cb548b9119115041d60e49663998
|
|
| MD5 |
a552a2acfc668151041aa18848714821
|
|
| BLAKE2b-256 |
50d1d115b2b00503926ccd4ce4e45b0be4f286cd3865b4a3a7010f47f6bc77c5
|