ISBN-Transformer is a Python package that transforms raw ISBN data into structured, visualizable formats. It is designed for librarians, book retailers, or anyone managing large book inventories, enabling quick insights and efficient data handling.
- Transforms raw ISBN data into structured, machine-readable output
- Ensures consistent formatting and reliable data extraction
- Supports visualization of book inventory data
- Integrates seamlessly with LangChain's LLM ecosystem
pip install isbn_transformerfrom isbn_transformer import isbn_transformer
user_input = "Your raw ISBN data here"
response = isbn_transformer(user_input)
print(response)You can use any LLM compatible with LangChain. Here are examples using different LLMs:
from langchain_openai import ChatOpenAI
from isbn_transformer import isbn_transformer
llm = ChatOpenAI()
response = isbn_transformer(user_input, llm=llm)
print(response)from langchain_anthropic import ChatAnthropic
from isbn_transformer import isbn_transformer
llm = ChatAnthropic()
response = isbn_transformer(user_input, llm=llm)
print(response)from langchain_google_genai import ChatGoogleGenerativeAI
from isbn_transformer import isbn_transformer
llm = ChatGoogleGenerativeAI()
response = isbn_transformer(user_input, llm=llm)
print(response)By default, the package uses the LLM7 API. You can pass your API key via an environment variable or directly in the function call.
import os
from isbn_transformer import isbn_transformer
os.environ["LLM7_API_KEY"] = "your_api_key"
response = isbn_transformer(user_input)
print(response)from isbn_transformer import isbn_transformer
response = isbn_transformer(user_input, api_key="your_api_key")
print(response)user_input(str): The user input text to process.llm(Optional[BaseChatModel]): The LangChain LLM instance to use. If not provided, the defaultChatLLM7will be used.api_key(Optional[str]): The API key for LLM7. If not provided, the package will use the default or the one set in the environment variableLLM7_API_KEY.
The default rate limits for LLM7's free tier are sufficient for most use cases of this package. If you need higher rate limits, you can pass your own API key via the environment variable LLM7_API_KEY or directly in the function call.
You can get a free API key by registering at LLM7.
If you encounter any issues, please report them on the GitHub issues page.
- Eugene Evstafev
- Email: hi@eugene.plus
- GitHub: chigwell