Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Avian Insight

PyPI version License: MIT Downloads LinkedIn

A package that extracts insights on bird behavior from text descriptions using pattern-matched LLM responses.

Installation

pip install avianinsight

Usage

from avianinsight import avianinsight

response = avianinsight(user_input, api_key="your_api_key", llm=your_llm_instance)

Parameters

  • user_input: str - the user input text to process
  • llm: Optional[BaseChatModel] - the langchain llm instance to use, defaults to ChatLLM7
  • api_key: Optional[str] - the api key for llm7, defaults to LLM7_API_KEY environment variable or "None"

Using alternative LLM instances

You can pass your own llm instance (based on https://docs.langchain.com/) by passing it like avianinsight(user_input, llm=their_llm_instance), for example:

from langchain_openai import ChatOpenAI from avianinsight import avianinsight
llm = ChatOpenAI()
response = avianinsight(user_input, llm=llm)
from langchain_anthropic import ChatAnthropic from avianinsight import avianinsight
llm = ChatAnthropic()
response = avianinsight(user_input, llm=llm)
from langchain_google_genai import ChatGoogleGenerativeAI from avianinsight import avianinsight
llm = ChatGoogleGenerativeAI()
response = avianinsight(user_input, llm=llm)

API Key Limitations

The default rate limits for LLM7 free tier are sufficient for most use cases of this package. If you need higher rate limits for LLM7, you can pass your own api_key via environment variable LLM7_API_KEY or via passing it directly like avianinsight(user_input, api_key="your_api_key".

Contributing

If you encounter any issues or have suggestions for improvement, please report them on the GitHub issues page: https://github.com/chigwell/avianinsight

Author