FundingExtractor is a Python package designed to process news headlines and extract structured information about company funding events. Using pattern matching, it ensures consistent and accurate data extraction from text inputs, capturing details such as startup names, valuation amounts, and funding rounds.
pip install fundingextractorfrom fundingextractor import fundingextractor
# Example user input
user_input = "Tech startup ABC raised $50M in Series A funding."
# Call the function with default LLM
results = fundingextractor(user_input)
print(results)-
user_input:
str
The input text to process, such as news headlines or reports. -
llm:
Optional[BaseChatModel]
An optional LangChain LLM instance. Defaults to usingChatLLM7fromlangchain_llm7. -
api_key:
Optional[str]
API key for the LLM service. If not provided, the package will attempt to use theLLM7_API_KEYenvironment variable.
The package uses ChatLLM7 from langchain_llm7 by default. You can also pass your own LLM instance to leverage different providers, such as:
- OpenAI
from langchain_openai import ChatOpenAI
from fundingextractor import fundingextractor
llm = ChatOpenAI()
response = fundingextractor(user_input, llm=llm)- Anthropic
from langchain_anthropic import ChatAnthropic
from fundingextractor import fundingextractor
llm = ChatAnthropic()
response = fundingextractor(user_input, llm=llm)- Google PaLM or Generative AI
from langchain_google_genai import ChatGoogleGenerativeAI
from fundingextractor import fundingextractor
llm = ChatGoogleGenerativeAI()
response = fundingextractor(user_input, llm=llm)- The default rate limits for LLM7's free tier are sufficient for general use.
- For higher rate limits, you can pass your API key via the
LLM7_API_KEYenvironment variable or directly in the function call:
response = fundingextractor(user_input, api_key="your_api_key")- Obtain a free API key by registering at https://token.llm7.io/
- The package utilizes
ChatLLM7from langchain_llm7
For issues or contributions, please visit the GitHub repository: https://github.com/chigwell/fundingextractor
- Eugene Evstafev
- Email: hi@eugene.plus
- GitHub: chigwell