An integration package connecting FmpData and LangChain
Project description
langchain-fmp-data
This package contains the LangChain integration with FMPData
Installation
pip install -U langchain-fmp-data
ToolBox
You can pass a natural language query indicating what type of tools you want to have. ToolKit return list of num_results tools that best match your query.
OpenAI is used for getting embedding so we can run similarity search on tools.
import os
from langchain_fmp_data import FMPDataToolkit
os.environ["FMP_API_KEY"] = "your-fmp-api-key" # pragma: allowlist secret
os.environ["OPENAI_API_KEY"] = "your-openai-api-key" # pragma: allowlist secret
query = "Stock market prices, fundamental and technical data"
fmp_toolkit = FMPDataToolkit(query=query, num_results=10)
tools = fmp_toolkit.get_tools()
Tool
Tool gives you a lang-graph based agent that can answer your questions. Under the hood, the agent retrieve tools relevant to your query and call Open AI to answer your question.
import os
from langchain_fmp_data import FMPDataTool
os.environ["FMP_API_KEY"] = "your-fmp-api-key" # pragma: allowlist secret
os.environ["OPENAI_API_KEY"] = "your-openai-api-key" # pragma: allowlist secret
query = "What is the latest price of Bitcoin?"
tool = FMPDataTool()
response = tool.invoke({"query": query})
print(response)
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
Built Distribution
File details
Details for the file langchain_fmp_data-0.1.0.tar.gz
.
File metadata
- Download URL: langchain_fmp_data-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.0 CPython/3.12.8 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
bcaaf97031f378491a0833180735ae3af82043d3b9f6cd8d5b43823fbb9f42a1
|
|
MD5 |
8842a2a2c7ee64a359dd1558e5ba3e94
|
|
BLAKE2b-256 |
88629f09d4edee6a324218b96519761677c71d90dac39a12de98c6b8fa345414
|
File details
Details for the file langchain_fmp_data-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: langchain_fmp_data-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.0 CPython/3.12.8 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
08ba1296134e611bc6250237ccc79fd9df235c0fabc38a046fd86410fd16da9b
|
|
MD5 |
a6022fb17f70c33b1fad429cbb726812
|
|
BLAKE2b-256 |
67ce248cb893a4c4b3dc4e03efa2cd942a415e31b859969de82aa9774b91bc39
|