top of page

LIVE : LLM App to get financials. Custom FastAPI Server. Web Deployment

Writer: Amar HarolikarAmar Harolikar

Updated: Apr 7, 2024

๐—œ๐—ป๐˜๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐—ถ๐—ป๐—ด ๐—ฌ๐—™๐—œ๐—ก ๐—•๐—ผ๐˜. Developed using Gen AI technologies. To pull equity market data from Yahoo Finance.

๐—ฃ๐˜‚๐—ฏ๐—น๐—ถ๐—ฐ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜ ๐—ฉ๐—ฒ๐—ฟ๐˜€๐—ถ๐—ผ๐—ป : YFIN Bot on Tigzig


LLM App to fetch financials from Yahoo Finance. Built with Flowise AI. Backend is FastAPI Server. Live app to demonstrate build of data pipeline for LLM Apps
LLM APP | Flowise AI | FastAPI Server

๐—Ÿ๐—œ๐—ฉ๐—˜ : ๐—Ÿ๐—Ÿ๐—  ๐—”๐—ฃ๐—ฃ ๐˜๐—ผ ๐—ด๐—ฒ๐˜ย ๐—ณ๐—ถ๐—ป๐—ฎ๐—ป๐—ฐ๐—ถ๐—ฎ๐—น๐˜€: ๐—–๐˜‚๐˜€๐˜๐—ผ๐—บ ๐—”๐—ฃ๐—œ ๐—˜๐—ป๐—ฑ๐—ฝ๐—ผ๐—ถ๐—ป๐˜. ๐—ช๐—ฒ๐—ฏ ๐——๐—ฒ๐—ฝ๐—น๐—ผ๐˜†๐—บ๐—ฒ๐—ป๐˜. ๐—š๐—ฃ๐—ง ๐—”๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€ [๐—–๐—ผ๐—ฑ๐—ฒ๐—ฑ ๐—ฏ๐˜† ๐—–๐—ต๐—ฎ๐˜๐—š๐—ฃ๐—ง / ๐—š๐—ฒ๐—บ๐—ถ๐—ป๐—ถ] Sam Altman, a few days back, said that AI will help coders become 30X programmers. I believe that is likely to be higher. For analysts, programmers, and data scientists.


In my previous videos and posts, I showed how to use ๐—š๐—ฃ๐—ง๐—ฃ๐—น๐˜‚๐˜€ ๐˜๐—ผ ๐—ฟ๐˜‚๐—ป ๐— ๐—ฎ๐—ฐ๐—ต๐—ถ๐—ป๐—ฒ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป๐—ถ๐—ป๐—ดย (https://rb.gy/o39bvm), Exploratory Data Analysis (https://rb.gy/0tc7xm), ๐—Ÿ๐—น๐—ฎ๐—บ๐—ฎ๐—ฃ๐—ฎ๐—ฟ๐˜€๐—ฒ ๐—ฐ๐—ผ๐—บ๐—ฝ๐—น๐—ฒ๐˜… ๐—ฃ๐——๐—™๐˜€ to analyze 10K / Annual Reportsย (live tool deployed at ๐š‘๐š๐š๐š™๐šœ://๐š ๐š ๐š .๐š๐š’๐š๐šฃ๐š’๐š.๐šŒ๐š˜๐š–/), analyze change in Mutual Fund Portfolio Allocations / import, clean and merge multiple excels


๐˜ผ๐™ก๐™ก ๐™–๐™ฅ๐™ฅ๐™จ, ๐™ž๐™ฃ๐™˜๐™ก๐™ช๐™™๐™ž๐™ฃ๐™œ ๐™ฉ๐™๐™ž๐™จ ๐™ค๐™ฃ๐™š, ๐™›๐™ช๐™ก๐™ก๐™ฎ ๐™˜๐™ค๐™™๐™š๐™™ ๐™—๐™ฎ ๐˜พ๐™๐™–๐™ฉ๐™‚๐™‹๐™ / ๐™‚๐™š๐™ข๐™ž๐™ฃ๐™ž


๐—–๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ป๐˜ ๐—จ๐˜€๐—ฒ ๐—–๐—ฎ๐˜€๐—ฒ: To pull balance sheet, income statement, cash flows for listed equities. For industry level analysis of specific line items for groups of stocks depending upon analysis. Line items and stock group varying depending upon analysis. ๐—œ๐—ป๐˜๐—ฟ๐—ผ๐—ฑ๐˜‚๐—ฐ๐—ถ๐—ป๐—ด ๐—ฌ๐—™๐—œ๐—ก ๐—•๐—ผ๐˜. Developed using Gen AI technologies. To pull equity market data from Yahoo Finance. The bot will fetch ๐—•๐—ฎ๐—น๐—ฎ๐—ป๐—ฐ๐—ฒ ๐—ฆ๐—ต๐—ฒ๐—ฒ๐˜, ๐—ฃ&๐—Ÿ, ๐—–๐—ฎ๐˜€๐—ต ๐—™๐—น๐—ผ๐˜„ ๐—ฆ๐˜๐—ฎ๐˜๐—ฒ๐—บ๐—ฒ๐—ป๐˜ & ๐—ค๐˜‚๐—ฎ๐—ฟ๐˜๐—ฒ๐—ฟ๐—น๐˜† ๐—œ๐—ป๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฆ๐˜๐—ฎ๐˜๐—ฒ๐—บ๐—ฒ๐—ป๐˜. ๐—”๐—น๐—น ๐—น๐—ถ๐—ป๐—ฒ ๐—ถ๐˜๐—ฒ๐—บ๐˜€ย and for the ๐—ฝ๐—ฎ๐˜€๐˜ ๐—ฐ๐—ผ๐˜‚๐—ฝ๐—น๐—ฒ ๐—ผ๐—ณ ๐˜†๐—ฒ๐—ฎ๐—ฟ๐˜€ as published on Yahoo Finance. And also the Adjusted ๐—–๐—น๐—ผ๐˜€๐—ถ๐—ป๐—ด ๐—ฃ๐—ฟ๐—ถ๐—ฐ๐—ฒ ๐—ฑ๐—ฎ๐˜๐—ฎ ๐—ณ๐—ผ๐—ฟ ๐—ฎ ๐—ด๐—ถ๐˜ƒ๐—ฒ๐—ป ๐˜๐—ถ๐—บ๐—ฒ ๐—ฟ๐—ฎ๐—ป๐—ด๐—ฒ. Can take multiple symbols too ย 


๐—ฃ๐˜‚๐—ฏ๐—น๐—ถ๐—ฐ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜ ๐—ฉ๐—ฒ๐—ฟ๐˜€๐—ถ๐—ผ๐—ป : YFIN Bot on Tigzig Feel free to try out. Has rate limits. For build specs, see below. ย 


๐—”๐—น๐˜€๐—ผ ๐—ฎ๐˜ƒ๐—ฎ๐—ถ๐—น๐—ฎ๐—ฏ๐—น๐—ฒ ๐—ฎ๐˜€ ๐—š๐—ฃ๐—ง ๐—ผ๐—ป ๐—š๐—ฃ๐—ง ๐—ฆ๐˜๐—ผ๐—ฟ๐—ฒ : ๐—ต๐˜๐˜๐—ฝ๐˜€://๐—ฟ๐—ฏ.๐—ด๐˜†/๐—ณ๐˜†๐Ÿด๐—น๐—ธ๐—ธ Uses custom actions to call custom built API endpoint running a python script. ย 


๐—•๐˜‚๐—ถ๐—น๐—ฑ ๐—ฆ๐—ฝ๐—ฒ๐—ฐ๐˜€.ย  ๐˜š๐˜ฆ๐˜ฆ ๐˜ค๐˜ฐ๐˜ฎ๐˜ฎ๐˜ฆ๐˜ฏ๐˜ต ๐˜ด๐˜ฆ๐˜ค๐˜ต๐˜ช๐˜ฐ๐˜ฏ ๐˜ฐ๐˜ฏ ๐˜ฉ๐˜ฐ๐˜ธ ๐˜ต๐˜ฉ๐˜ฆ ๐˜ต๐˜ฐ๐˜ฐ๐˜ญ ๐˜ธ๐˜ข๐˜ด ๐˜ฃ๐˜ถ๐˜ช๐˜ญ๐˜ต

๐˜—๐˜ญ๐˜ข๐˜ต๐˜ง๐˜ฐ๐˜ณ๐˜ฎ: FlowWiseย 

Coding by : ChatGPT/ Gemini

๐˜Š๐˜ฐ๐˜ฎ๐˜ฑ๐˜ฐ๐˜ฏ๐˜ฆ๐˜ฏ๐˜ต๐˜ด: Langchain with Function Agent, Custom Tool, Chat Model ๐˜ˆ๐˜—๐˜: Custom built FastAPI server. Running python script. Called from YFIN Bot as well as from Custom GPT.

๐˜š๐˜ค๐˜ณ๐˜ช๐˜ฑ๐˜ต : Python. Uses yfinance package, wrapped in a FastAPI wrapper

๐˜“๐˜“๐˜”: OpenAI GPT-3.5 -Turbo -0125

๐˜‹๐˜ฆ๐˜ฑ๐˜ญ๐˜ฐ๐˜บ๐˜ฎ๐˜ฆ๐˜ฏ๐˜ต: Render Cloud

๐˜๐˜ฐ๐˜ด๐˜ต๐˜ช๐˜ฏ๐˜จ : Wix. Embed.


๐—›๐—ผ๐˜„ ๐˜๐—ผ ๐—ฏ๐˜‚๐—ถ๐—น๐—ฑ:


This tool was built on Flowise AI: an incredibly powerful and easy to use platform. GUI-based low-code/no-code platform for building out Gen AI Apps rapidly. It's built on Langchain framework and supports LlamaIndex too. Custom JavaScript, API end point deployment, multiple LLM's, RAG toolkit, API Chains, Doc loaders and more. Lovely to work with.

And for those keen to get up to speed quickly, the video tutorials from Leon van Zyl on YouTube are out of this world. (https://rb.gy/xq1ic8). Includes live deployments.


For Python / FastAPI coding : ChatGPT 3.5


For JSON schema for custom actions : OpenAI's own custom GPT called 'Action GPT' and another GPT called ' GPT Action Builder'






ย 
ย 
bottom of page